<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE ScopedTypeVariables #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE TypeFamilies #-}</span><span>
</span><span id="line-3"></span><span class="hs-comment">-- | See &lt;https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst&gt;</span><span>
</span><span id="line-4"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Backpack.LinkedComponent</span><span> </span><span class="hs-special">(</span><span>
</span><span id="line-5"></span><span>    </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponent"><span class="hs-identifier">LinkedComponent</span></a></span><span class="hs-special">(</span><span class="hs-glyph">..</span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-6"></span><span>    </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#lc_insts"><span class="hs-identifier">lc_insts</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-7"></span><span>    </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#lc_uid"><span class="hs-identifier">lc_uid</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-8"></span><span>    </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#lc_cid"><span class="hs-identifier">lc_cid</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-9"></span><span>    </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#lc_pkgid"><span class="hs-identifier">lc_pkgid</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-10"></span><span>    </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#toLinkedComponent"><span class="hs-identifier">toLinkedComponent</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-11"></span><span>    </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#toLinkedComponents"><span class="hs-identifier">toLinkedComponents</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-12"></span><span>    </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#dispLinkedComponent"><span class="hs-identifier">dispLinkedComponent</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-13"></span><span>    </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponentMap"><span class="hs-identifier">LinkedComponentMap</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-14"></span><span>    </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#extendLinkedComponentMap"><span class="hs-identifier">extendLinkedComponentMap</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-15"></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span> </span><span class="hs-keyword">hiding</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Base.html#%3C%3E"><span class="hs-operator">(&lt;&gt;)</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-19"></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Backpack.html"><span class="hs-identifier">Distribution.Backpack</span></a></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Backpack.FullUnitId.html"><span class="hs-identifier">Distribution.Backpack.FullUnitId</span></a></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Backpack.ConfiguredComponent.html"><span class="hs-identifier">Distribution.Backpack.ConfiguredComponent</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Backpack.ModuleShape.html"><span class="hs-identifier">Distribution.Backpack.ModuleShape</span></a></span><span>
</span><span id="line-24"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Backpack.PreModuleShape.html"><span class="hs-identifier">Distribution.Backpack.PreModuleShape</span></a></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Backpack.ModuleScope.html"><span class="hs-identifier">Distribution.Backpack.ModuleScope</span></a></span><span>
</span><span id="line-26"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Backpack.UnifyM.html"><span class="hs-identifier">Distribution.Backpack.UnifyM</span></a></span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Backpack.MixLink.html"><span class="hs-identifier">Distribution.Backpack.MixLink</span></a></span><span>
</span><span id="line-28"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Utils.MapAccum.html"><span class="hs-identifier">Distribution.Utils.MapAccum</span></a></span><span>
</span><span id="line-29"></span><span>
</span><span id="line-30"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.AnnotatedId.html"><span class="hs-identifier">Distribution.Types.AnnotatedId</span></a></span><span>
</span><span id="line-31"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentName.html"><span class="hs-identifier">Distribution.Types.ComponentName</span></a></span><span>
</span><span id="line-32"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.ModuleReexport.html"><span class="hs-identifier">Distribution.Types.ModuleReexport</span></a></span><span>
</span><span id="line-33"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.ModuleRenaming.html"><span class="hs-identifier">Distribution.Types.ModuleRenaming</span></a></span><span>
</span><span id="line-34"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.IncludeRenaming.html"><span class="hs-identifier">Distribution.Types.IncludeRenaming</span></a></span><span>
</span><span id="line-35"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentInclude.html"><span class="hs-identifier">Distribution.Types.ComponentInclude</span></a></span><span>
</span><span id="line-36"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentId.html"><span class="hs-identifier">Distribution.Types.ComponentId</span></a></span><span>
</span><span id="line-37"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html"><span class="hs-identifier">Distribution.Types.PackageId</span></a></span><span>
</span><span id="line-38"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Package.html"><span class="hs-identifier">Distribution.Package</span></a></span><span>
</span><span id="line-39"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.PackageDescription.html"><span class="hs-identifier">Distribution.PackageDescription</span></a></span><span>
</span><span id="line-40"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.ModuleName.html"><span class="hs-identifier">Distribution.ModuleName</span></a></span><span>
</span><span id="line-41"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.LocalBuildInfo.html"><span class="hs-identifier">Distribution.Simple.LocalBuildInfo</span></a></span><span>
</span><span id="line-42"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html"><span class="hs-identifier">Distribution.Verbosity</span></a></span><span>
</span><span id="line-43"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Utils.LogProgress.html"><span class="hs-identifier">Distribution.Utils.LogProgress</span></a></span><span>
</span><span id="line-44"></span><span>
</span><span id="line-45"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Set.html#"><span class="hs-identifier">Data.Set</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Set</span></span><span>
</span><span id="line-46"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.html#"><span class="hs-identifier">Data.Map</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Map</span></span><span>
</span><span id="line-47"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Pretty.html"><span class="hs-identifier">Distribution.Pretty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier">pretty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-48"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.html#"><span class="hs-identifier">Text.PrettyPrint</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#Doc"><span class="hs-identifier">Doc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#hang"><span class="hs-identifier">hang</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier">text</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#vcat"><span class="hs-identifier">vcat</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#%24%2B%24"><span class="hs-operator">($+$)</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#hsep"><span class="hs-identifier">hsep</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#quotes"><span class="hs-identifier">quotes</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-49"></span><span>
</span><span id="line-50"></span><span class="hs-comment">-- | A linked component is a component that has been mix-in linked, at</span><span>
</span><span id="line-51"></span><span class="hs-comment">-- which point we have determined how all the dependencies of the</span><span>
</span><span id="line-52"></span><span class="hs-comment">-- component are explicitly instantiated (in the form of an OpenUnitId).</span><span>
</span><span id="line-53"></span><span class="hs-comment">-- 'ConfiguredComponent' is mix-in linked into 'LinkedComponent', which</span><span>
</span><span id="line-54"></span><span class="hs-comment">-- is then instantiated into 'ReadyComponent'.</span><span>
</span><span id="line-55"></span><span class="hs-keyword">data</span><span> </span><span id="LinkedComponent"><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponent"><span class="hs-identifier hs-var">LinkedComponent</span></a></span></span><span>
</span><span id="line-56"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span id="LinkedComponent"><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponent"><span class="hs-identifier hs-var">LinkedComponent</span></a></span></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-57"></span><span>        </span><span class="hs-comment">-- | Uniquely identifies linked component</span><span>
</span><span id="line-58"></span><span>        </span><span id="lc_ann_id"><span class="annot"><span class="annottext">LinkedComponent -&gt; AnnotatedId ComponentId
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_ann_id"><span class="hs-identifier hs-var hs-var">lc_ann_id</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.AnnotatedId.html#AnnotatedId"><span class="hs-identifier hs-type">AnnotatedId</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.ComponentId.html#ComponentId"><span class="hs-identifier hs-type">ComponentId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-59"></span><span>        </span><span class="hs-comment">-- | Corresponds to 'cc_component'.</span><span>
</span><span id="line-60"></span><span>        </span><span id="lc_component"><span class="annot"><span class="annottext">LinkedComponent -&gt; Component
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_component"><span class="hs-identifier hs-var hs-var">lc_component</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.Component.html#Component"><span class="hs-identifier hs-type">Component</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-61"></span><span>        </span><span class="hs-comment">-- | @build-tools@ and @build-tool-depends@ dependencies.</span><span>
</span><span id="line-62"></span><span>        </span><span class="hs-comment">-- Corresponds to 'cc_exe_deps'.</span><span>
</span><span id="line-63"></span><span>        </span><span id="lc_exe_deps"><span class="annot"><span class="annottext">LinkedComponent -&gt; [AnnotatedId OpenUnitId]
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_exe_deps"><span class="hs-identifier hs-var hs-var">lc_exe_deps</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.AnnotatedId.html#AnnotatedId"><span class="hs-identifier hs-type">AnnotatedId</span></a></span><span> </span><span class="annot"><a href="Distribution.Backpack.html#OpenUnitId"><span class="hs-identifier hs-type">OpenUnitId</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-64"></span><span>        </span><span class="hs-comment">-- | Is this the public library of a package?  Corresponds to</span><span>
</span><span id="line-65"></span><span>        </span><span class="hs-comment">-- 'cc_public'.</span><span>
</span><span id="line-66"></span><span>        </span><span id="lc_public"><span class="annot"><span class="annottext">LinkedComponent -&gt; Bool
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_public"><span class="hs-identifier hs-var hs-var">lc_public</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span class="hs-special">,</span><span>
</span><span id="line-67"></span><span>        </span><span class="hs-comment">-- | Corresponds to 'cc_includes', but (1) this does not contain</span><span>
</span><span id="line-68"></span><span>        </span><span class="hs-comment">-- includes of signature packages (packages with no exports),</span><span>
</span><span id="line-69"></span><span>        </span><span class="hs-comment">-- and (2) the 'ModuleRenaming' for requirements (stored in</span><span>
</span><span id="line-70"></span><span>        </span><span class="hs-comment">-- 'IncludeRenaming') has been removed, as it is reflected in</span><span>
</span><span id="line-71"></span><span>        </span><span class="hs-comment">-- 'OpenUnitId'.)</span><span>
</span><span id="line-72"></span><span>        </span><span id="lc_includes"><span class="annot"><span class="annottext">LinkedComponent -&gt; [ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_includes"><span class="hs-identifier hs-var hs-var">lc_includes</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.ComponentInclude.html#ComponentInclude"><span class="hs-identifier hs-type">ComponentInclude</span></a></span><span> </span><span class="annot"><a href="Distribution.Backpack.html#OpenUnitId"><span class="hs-identifier hs-type">OpenUnitId</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.ModuleRenaming.html#ModuleRenaming"><span class="hs-identifier hs-type">ModuleRenaming</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-73"></span><span>        </span><span class="hs-comment">-- | Like 'lc_includes', but this specifies includes on</span><span>
</span><span id="line-74"></span><span>        </span><span class="hs-comment">-- signature packages which have no exports.</span><span>
</span><span id="line-75"></span><span>        </span><span id="lc_sig_includes"><span class="annot"><span class="annottext">LinkedComponent -&gt; [ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_sig_includes"><span class="hs-identifier hs-var hs-var">lc_sig_includes</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.ComponentInclude.html#ComponentInclude"><span class="hs-identifier hs-type">ComponentInclude</span></a></span><span> </span><span class="annot"><a href="Distribution.Backpack.html#OpenUnitId"><span class="hs-identifier hs-type">OpenUnitId</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.ModuleRenaming.html#ModuleRenaming"><span class="hs-identifier hs-type">ModuleRenaming</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-76"></span><span>        </span><span class="hs-comment">-- | The module shape computed by mix-in linking.  This is</span><span>
</span><span id="line-77"></span><span>        </span><span class="hs-comment">-- newly computed from 'ConfiguredComponent'</span><span>
</span><span id="line-78"></span><span>        </span><span id="lc_shape"><span class="annot"><span class="annottext">LinkedComponent -&gt; ModuleShape
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_shape"><span class="hs-identifier hs-var hs-var">lc_shape</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Backpack.ModuleShape.html#ModuleShape"><span class="hs-identifier hs-type">ModuleShape</span></a></span><span>
</span><span id="line-79"></span><span>      </span><span class="hs-special">}</span><span>
</span><span id="line-80"></span><span>
</span><span id="line-81"></span><span class="hs-comment">-- | Uniquely identifies a 'LinkedComponent'.  Corresponds to</span><span>
</span><span id="line-82"></span><span class="hs-comment">-- 'cc_cid'.</span><span>
</span><span id="line-83"></span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#lc_cid"><span class="hs-identifier hs-type">lc_cid</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponent"><span class="hs-identifier hs-type">LinkedComponent</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentId.html#ComponentId"><span class="hs-identifier hs-type">ComponentId</span></a></span><span>
</span><span id="line-84"></span><span id="lc_cid"><span class="annot"><span class="annottext">lc_cid :: LinkedComponent -&gt; ComponentId
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_cid"><span class="hs-identifier hs-var hs-var">lc_cid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AnnotatedId ComponentId -&gt; ComponentId
forall id. AnnotatedId id -&gt; id
</span><a href="Distribution.Types.AnnotatedId.html#ann_id"><span class="hs-identifier hs-var hs-var">ann_id</span></a></span><span> </span><span class="annot"><span class="annottext">(AnnotatedId ComponentId -&gt; ComponentId)
-&gt; (LinkedComponent -&gt; AnnotatedId ComponentId)
-&gt; LinkedComponent
-&gt; ComponentId
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponent -&gt; AnnotatedId ComponentId
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_ann_id"><span class="hs-identifier hs-var hs-var">lc_ann_id</span></a></span><span>
</span><span id="line-85"></span><span>
</span><span id="line-86"></span><span class="hs-comment">-- | Corresponds to 'cc_pkgid'.</span><span>
</span><span id="line-87"></span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#lc_pkgid"><span class="hs-identifier hs-type">lc_pkgid</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponent"><span class="hs-identifier hs-type">LinkedComponent</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageId"><span class="hs-identifier hs-type">PackageId</span></a></span><span>
</span><span id="line-88"></span><span id="lc_pkgid"><span class="annot"><span class="annottext">lc_pkgid :: LinkedComponent -&gt; PackageId
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_pkgid"><span class="hs-identifier hs-var hs-var">lc_pkgid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AnnotatedId ComponentId -&gt; PackageId
forall id. AnnotatedId id -&gt; PackageId
</span><a href="Distribution.Types.AnnotatedId.html#ann_pid"><span class="hs-identifier hs-var hs-var">ann_pid</span></a></span><span> </span><span class="annot"><span class="annottext">(AnnotatedId ComponentId -&gt; PackageId)
-&gt; (LinkedComponent -&gt; AnnotatedId ComponentId)
-&gt; LinkedComponent
-&gt; PackageId
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponent -&gt; AnnotatedId ComponentId
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_ann_id"><span class="hs-identifier hs-var hs-var">lc_ann_id</span></a></span><span>
</span><span id="line-89"></span><span>
</span><span id="line-90"></span><span class="hs-comment">-- | The 'OpenUnitId' of this component in the &quot;default&quot; instantiation.</span><span>
</span><span id="line-91"></span><span class="hs-comment">-- See also 'lc_insts'.  'LinkedComponent's cannot be instantiated</span><span>
</span><span id="line-92"></span><span class="hs-comment">-- (e.g., there is no 'ModSubst' instance for them).</span><span>
</span><span id="line-93"></span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#lc_uid"><span class="hs-identifier hs-type">lc_uid</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponent"><span class="hs-identifier hs-type">LinkedComponent</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Backpack.html#OpenUnitId"><span class="hs-identifier hs-type">OpenUnitId</span></a></span><span>
</span><span id="line-94"></span><span id="lc_uid"><span class="annot"><span class="annottext">lc_uid :: LinkedComponent -&gt; OpenUnitId
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_uid"><span class="hs-identifier hs-var hs-var">lc_uid</span></a></span></span><span> </span><span id="local-6989586621679723139"><span class="annot"><span class="annottext">LinkedComponent
</span><a href="#local-6989586621679723139"><span class="hs-identifier hs-var">lc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentId -&gt; OpenModuleSubst -&gt; OpenUnitId
</span><a href="Distribution.Backpack.html#IndefFullUnitId"><span class="hs-identifier hs-var">IndefFullUnitId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LinkedComponent -&gt; ComponentId
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_cid"><span class="hs-identifier hs-var">lc_cid</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponent
</span><a href="#local-6989586621679723139"><span class="hs-identifier hs-var">lc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(OpenModuleSubst -&gt; OpenUnitId)
-&gt; ([(ModuleName, OpenModule)] -&gt; OpenModuleSubst)
-&gt; [(ModuleName, OpenModule)]
-&gt; OpenUnitId
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[(ModuleName, OpenModule)] -&gt; OpenModuleSubst
forall k a. Ord k =&gt; [(k, a)] -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#fromList"><span class="hs-identifier hs-var">Map.fromList</span></a></span><span> </span><span class="annot"><span class="annottext">([(ModuleName, OpenModule)] -&gt; OpenUnitId)
-&gt; [(ModuleName, OpenModule)] -&gt; OpenUnitId
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponent -&gt; [(ModuleName, OpenModule)]
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_insts"><span class="hs-identifier hs-var">lc_insts</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponent
</span><a href="#local-6989586621679723139"><span class="hs-identifier hs-var">lc</span></a></span><span>
</span><span id="line-95"></span><span>
</span><span id="line-96"></span><span class="hs-comment">-- | The instantiation of 'lc_uid'; this always has the invariant</span><span>
</span><span id="line-97"></span><span class="hs-comment">-- that it is a mapping from a module name @A@ to @&lt;A&gt;@ (the hole A).</span><span>
</span><span id="line-98"></span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#lc_insts"><span class="hs-identifier hs-type">lc_insts</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponent"><span class="hs-identifier hs-type">LinkedComponent</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Backpack.html#OpenModule"><span class="hs-identifier hs-type">OpenModule</span></a></span><span class="hs-special">)</span><span class="hs-special">]</span><span>
</span><span id="line-99"></span><span id="lc_insts"><span class="annot"><span class="annottext">lc_insts :: LinkedComponent -&gt; [(ModuleName, OpenModule)]
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_insts"><span class="hs-identifier hs-var hs-var">lc_insts</span></a></span></span><span> </span><span id="local-6989586621679723136"><span class="annot"><span class="annottext">LinkedComponent
</span><a href="#local-6989586621679723136"><span class="hs-identifier hs-var">lc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679723135"><span class="hs-identifier hs-var">req</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; OpenModule
</span><a href="Distribution.Backpack.html#OpenModuleVar"><span class="hs-identifier hs-var">OpenModuleVar</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679723135"><span class="hs-identifier hs-var">req</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-100"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679723135"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679723135"><span class="hs-identifier hs-var">req</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Set ModuleName -&gt; [ModuleName]
forall a. Set a -&gt; [a]
</span><a href="../../containers/src/Data.Set.Internal.html#toList"><span class="hs-identifier hs-var">Set.toList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleShape -&gt; Set ModuleName
</span><a href="Distribution.Backpack.ModuleShape.html#modShapeRequires"><span class="hs-identifier hs-var hs-var">modShapeRequires</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LinkedComponent -&gt; ModuleShape
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_shape"><span class="hs-identifier hs-var hs-var">lc_shape</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponent
</span><a href="#local-6989586621679723136"><span class="hs-identifier hs-var">lc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-101"></span><span>
</span><span id="line-102"></span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#dispLinkedComponent"><span class="hs-identifier hs-type">dispLinkedComponent</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponent"><span class="hs-identifier hs-type">LinkedComponent</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-103"></span><span id="dispLinkedComponent"><span class="annot"><span class="annottext">dispLinkedComponent :: LinkedComponent -&gt; Doc
</span><a href="Distribution.Backpack.LinkedComponent.html#dispLinkedComponent"><span class="hs-identifier hs-var hs-var">dispLinkedComponent</span></a></span></span><span> </span><span id="local-6989586621679723131"><span class="annot"><span class="annottext">LinkedComponent
</span><a href="#local-6989586621679723131"><span class="hs-identifier hs-var">lc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-104"></span><span>    </span><span class="annot"><span class="annottext">Doc -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;unit&quot;</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">OpenUnitId -&gt; Doc
forall a. Pretty a =&gt; a -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var">pretty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LinkedComponent -&gt; OpenUnitId
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_uid"><span class="hs-identifier hs-var">lc_uid</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponent
</span><a href="#local-6989586621679723131"><span class="hs-identifier hs-var">lc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; Doc) -&gt; Doc -&gt; Doc
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-105"></span><span>         </span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;include&quot;</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">OpenUnitId -&gt; Doc
forall a. Pretty a =&gt; a -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var">pretty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentInclude OpenUnitId ModuleRenaming -&gt; OpenUnitId
forall id rn. ComponentInclude id rn -&gt; id
</span><a href="Distribution.Types.ComponentInclude.html#ci_id"><span class="hs-identifier hs-var">ci_id</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInclude OpenUnitId ModuleRenaming
</span><a href="#local-6989586621679723128"><span class="hs-identifier hs-var">incl</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleRenaming -&gt; Doc
forall a. Pretty a =&gt; a -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var">pretty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentInclude OpenUnitId ModuleRenaming -&gt; ModuleRenaming
forall id rn. ComponentInclude id rn -&gt; rn
</span><a href="Distribution.Types.ComponentInclude.html#ci_renaming"><span class="hs-identifier hs-var hs-var">ci_renaming</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInclude OpenUnitId ModuleRenaming
</span><a href="#local-6989586621679723128"><span class="hs-identifier hs-var">incl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-106"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679723128"><span class="annot"><span class="annottext">ComponentInclude OpenUnitId ModuleRenaming
</span><a href="#local-6989586621679723128"><span class="hs-identifier hs-var">incl</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LinkedComponent -&gt; [ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_includes"><span class="hs-identifier hs-var hs-var">lc_includes</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponent
</span><a href="#local-6989586621679723131"><span class="hs-identifier hs-var">lc</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-107"></span><span>            </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#%24%2B%24"><span class="hs-operator hs-var">$+$</span></a></span><span>
</span><span id="line-108"></span><span>         </span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;signature include&quot;</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">OpenUnitId -&gt; Doc
forall a. Pretty a =&gt; a -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var">pretty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentInclude OpenUnitId ModuleRenaming -&gt; OpenUnitId
forall id rn. ComponentInclude id rn -&gt; id
</span><a href="Distribution.Types.ComponentInclude.html#ci_id"><span class="hs-identifier hs-var">ci_id</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInclude OpenUnitId ModuleRenaming
</span><a href="#local-6989586621679723126"><span class="hs-identifier hs-var">incl</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-109"></span><span>              </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679723126"><span class="annot"><span class="annottext">ComponentInclude OpenUnitId ModuleRenaming
</span><a href="#local-6989586621679723126"><span class="hs-identifier hs-var">incl</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">LinkedComponent -&gt; [ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_sig_includes"><span class="hs-identifier hs-var hs-var">lc_sig_includes</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponent
</span><a href="#local-6989586621679723131"><span class="hs-identifier hs-var">lc</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-110"></span><span>            </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#%24%2B%24"><span class="hs-operator hs-var">$+$</span></a></span><span> </span><span class="annot"><span class="annottext">OpenModuleSubst -&gt; Doc
</span><a href="Distribution.Backpack.html#dispOpenModuleSubst"><span class="hs-identifier hs-var">dispOpenModuleSubst</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleShape -&gt; OpenModuleSubst
</span><a href="Distribution.Backpack.ModuleShape.html#modShapeProvides"><span class="hs-identifier hs-var hs-var">modShapeProvides</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LinkedComponent -&gt; ModuleShape
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_shape"><span class="hs-identifier hs-var hs-var">lc_shape</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponent
</span><a href="#local-6989586621679723131"><span class="hs-identifier hs-var">lc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-111"></span><span>
</span><span id="line-112"></span><span class="hs-keyword">instance</span><span> </span><span class="annot"><a href="Distribution.Package.html#Package"><span class="hs-identifier hs-type">Package</span></a></span><span> </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponent"><span class="hs-identifier hs-type">LinkedComponent</span></a></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-113"></span><span>    </span><span id="local-6989586621679723120"><span class="annot"><span class="annottext">packageId :: LinkedComponent -&gt; PackageId
</span><a href="Distribution.Package.html#packageId"><span class="hs-identifier hs-var hs-var hs-var hs-var">packageId</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">LinkedComponent -&gt; PackageId
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_pkgid"><span class="hs-identifier hs-var">lc_pkgid</span></a></span><span>
</span><span id="line-114"></span><span>
</span><span id="line-115"></span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#toLinkedComponent"><span class="hs-identifier hs-type">toLinkedComponent</span></a></span><span>
</span><span id="line-116"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-117"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Backpack.FullUnitId.html#FullDb"><span class="hs-identifier hs-type">FullDb</span></a></span><span>
</span><span id="line-118"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageId"><span class="hs-identifier hs-type">PackageId</span></a></span><span>
</span><span id="line-119"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponentMap"><span class="hs-identifier hs-type">LinkedComponentMap</span></a></span><span>
</span><span id="line-120"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Backpack.ConfiguredComponent.html#ConfiguredComponent"><span class="hs-identifier hs-type">ConfiguredComponent</span></a></span><span>
</span><span id="line-121"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Utils.LogProgress.html#LogProgress"><span class="hs-identifier hs-type">LogProgress</span></a></span><span> </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponent"><span class="hs-identifier hs-type">LinkedComponent</span></a></span><span>
</span><span id="line-122"></span><span id="toLinkedComponent"><span class="annot"><span class="annottext">toLinkedComponent :: Verbosity
-&gt; FullDb
-&gt; PackageId
-&gt; LinkedComponentMap
-&gt; ConfiguredComponent
-&gt; LogProgress LinkedComponent
</span><a href="Distribution.Backpack.LinkedComponent.html#toLinkedComponent"><span class="hs-identifier hs-var hs-var">toLinkedComponent</span></a></span></span><span> </span><span id="local-6989586621679723118"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679723118"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679723117"><span class="annot"><span class="annottext">FullDb
</span><a href="#local-6989586621679723117"><span class="hs-identifier hs-var">db</span></a></span></span><span> </span><span id="local-6989586621679723116"><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679723116"><span class="hs-identifier hs-var">this_pid</span></a></span></span><span> </span><span id="local-6989586621679723115"><span class="annot"><span class="annottext">LinkedComponentMap
</span><a href="#local-6989586621679723115"><span class="hs-identifier hs-var">pkg_map</span></a></span></span><span> </span><span class="annot"><a href="Distribution.Backpack.ConfiguredComponent.html#ConfiguredComponent"><span class="hs-identifier hs-type">ConfiguredComponent</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-123"></span><span>    </span><span class="annot"><span class="annottext">cc_ann_id :: ConfiguredComponent -&gt; AnnotatedId ComponentId
</span><a href="Distribution.Backpack.ConfiguredComponent.html#cc_ann_id"><span class="hs-identifier hs-var">cc_ann_id</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679723112"><span class="annot"><span class="annottext">aid :: AnnotatedId ComponentId
</span><a href="#local-6989586621679723112"><span class="hs-identifier hs-var">aid</span></a></span></span><span class="hs-glyph">@</span><span class="annot"><a href="Distribution.Types.AnnotatedId.html#AnnotatedId"><span class="hs-identifier hs-type">AnnotatedId</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ann_id :: forall id. AnnotatedId id -&gt; id
</span><a href="Distribution.Types.AnnotatedId.html#ann_id"><span class="hs-identifier hs-var">ann_id</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679723110"><span class="annot"><span class="annottext">ComponentId
</span><a href="#local-6989586621679723110"><span class="hs-identifier hs-var">this_cid</span></a></span></span><span> </span><span class="hs-special">}</span><span class="hs-special">,</span><span>
</span><span id="line-124"></span><span>    </span><span class="annot"><span class="annottext">cc_component :: ConfiguredComponent -&gt; Component
</span><a href="Distribution.Backpack.ConfiguredComponent.html#cc_component"><span class="hs-identifier hs-var">cc_component</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679723108"><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679723108"><span class="hs-identifier hs-var">component</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-125"></span><span>    </span><span class="annot"><span class="annottext">cc_exe_deps :: ConfiguredComponent -&gt; [AnnotatedId ComponentId]
</span><a href="Distribution.Backpack.ConfiguredComponent.html#cc_exe_deps"><span class="hs-identifier hs-var">cc_exe_deps</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679723106"><span class="annot"><span class="annottext">[AnnotatedId ComponentId]
</span><a href="#local-6989586621679723106"><span class="hs-identifier hs-var">exe_deps</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-126"></span><span>    </span><span class="annot"><span class="annottext">cc_public :: ConfiguredComponent -&gt; Bool
</span><a href="Distribution.Backpack.ConfiguredComponent.html#cc_public"><span class="hs-identifier hs-var">cc_public</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679723104"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679723104"><span class="hs-identifier hs-var">is_public</span></a></span></span><span class="hs-special">,</span><span>
</span><span id="line-127"></span><span>    </span><span class="annot"><span class="annottext">cc_includes :: ConfiguredComponent
-&gt; [ComponentInclude ComponentId IncludeRenaming]
</span><a href="Distribution.Backpack.ConfiguredComponent.html#cc_includes"><span class="hs-identifier hs-var">cc_includes</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="local-6989586621679723102"><span class="annot"><span class="annottext">[ComponentInclude ComponentId IncludeRenaming]
</span><a href="#local-6989586621679723102"><span class="hs-identifier hs-var">cid_includes</span></a></span></span><span>
</span><span id="line-128"></span><span>   </span><span class="hs-special">}</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-129"></span><span>    </span><span class="hs-keyword">let</span><span>
</span><span id="line-130"></span><span>        </span><span class="hs-comment">-- The explicitly specified requirements, provisions and</span><span>
</span><span id="line-131"></span><span>        </span><span class="hs-comment">-- reexports from the Cabal file.  These are only non-empty for</span><span>
</span><span id="line-132"></span><span>        </span><span class="hs-comment">-- libraries; everything else is trivial.</span><span>
</span><span id="line-133"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621679723101"><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679723101"><span class="hs-identifier hs-var">src_reqs</span></a></span></span><span>      </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-134"></span><span>         </span><span id="local-6989586621679723100"><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679723100"><span class="hs-identifier hs-var">src_provs</span></a></span></span><span>     </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-135"></span><span>         </span><span id="local-6989586621679723099"><span class="annot"><span class="annottext">[ModuleReexport]
</span><a href="#local-6989586621679723099"><span class="hs-identifier hs-var">src_reexports</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.ModuleReexport.html#ModuleReexport"><span class="hs-identifier hs-type">ModuleReexport</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-136"></span><span>            </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679723108"><span class="hs-identifier hs-var">component</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-137"></span><span>                </span><span class="annot"><a href="Distribution.Types.Component.html#CLib"><span class="hs-identifier hs-type">CLib</span></a></span><span> </span><span id="local-6989586621679723097"><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679723097"><span class="hs-identifier hs-var">lib</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Library -&gt; [ModuleName]
</span><a href="Distribution.Types.Library.html#signatures"><span class="hs-identifier hs-var hs-var">signatures</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679723097"><span class="hs-identifier hs-var">lib</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-138"></span><span>                             </span><span class="annot"><span class="annottext">Library -&gt; [ModuleName]
</span><a href="Distribution.Types.Library.html#exposedModules"><span class="hs-identifier hs-var hs-var">exposedModules</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679723097"><span class="hs-identifier hs-var">lib</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-139"></span><span>                             </span><span class="annot"><span class="annottext">Library -&gt; [ModuleReexport]
</span><a href="Distribution.Types.Library.html#reexportedModules"><span class="hs-identifier hs-var hs-var">reexportedModules</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><a href="#local-6989586621679723097"><span class="hs-identifier hs-var">lib</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-140"></span><span>                </span><span class="annot"><span class="annottext">Component
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-141"></span><span>        </span><span id="local-6989586621679723093"><span class="annot"><span class="annottext">src_hidden :: [ModuleName]
</span><a href="#local-6989586621679723093"><span class="hs-identifier hs-var hs-var">src_hidden</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">BuildInfo -&gt; [ModuleName]
</span><a href="Distribution.Types.BuildInfo.html#otherModules"><span class="hs-identifier hs-var hs-var">otherModules</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Component -&gt; BuildInfo
</span><a href="Distribution.Types.Component.html#componentBuildInfo"><span class="hs-identifier hs-var">componentBuildInfo</span></a></span><span> </span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679723108"><span class="hs-identifier hs-var">component</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-142"></span><span>
</span><span id="line-143"></span><span>        </span><span class="hs-comment">-- Take each included ComponentId and resolve it into an</span><span>
</span><span id="line-144"></span><span>        </span><span class="hs-comment">-- *unlinked* unit identity.  We will use unification (relying</span><span>
</span><span id="line-145"></span><span>        </span><span class="hs-comment">-- on the ModuleShape) to resolve these into linked identities.</span><span>
</span><span id="line-146"></span><span>        </span><span class="annot"><a href="#local-6989586621679723090"><span class="hs-identifier hs-type">unlinked_includes</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.ComponentInclude.html#ComponentInclude"><span class="hs-identifier hs-type">ComponentInclude</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Backpack.html#OpenUnitId"><span class="hs-identifier hs-type">OpenUnitId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Backpack.ModuleShape.html#ModuleShape"><span class="hs-identifier hs-type">ModuleShape</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><a href="Distribution.Types.IncludeRenaming.html#IncludeRenaming"><span class="hs-identifier hs-type">IncludeRenaming</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-147"></span><span>        </span><span id="local-6989586621679723090"><span class="annot"><span class="annottext">unlinked_includes :: [ComponentInclude (OpenUnitId, ModuleShape) IncludeRenaming]
</span><a href="#local-6989586621679723090"><span class="hs-identifier hs-var hs-var">unlinked_includes</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">AnnotatedId (OpenUnitId, ModuleShape)
-&gt; IncludeRenaming
-&gt; Bool
-&gt; ComponentInclude (OpenUnitId, ModuleShape) IncludeRenaming
forall id rn.
AnnotatedId id -&gt; rn -&gt; Bool -&gt; ComponentInclude id rn
</span><a href="Distribution.Types.ComponentInclude.html#ComponentInclude"><span class="hs-identifier hs-var">ComponentInclude</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ComponentId -&gt; (OpenUnitId, ModuleShape))
-&gt; AnnotatedId ComponentId -&gt; AnnotatedId (OpenUnitId, ModuleShape)
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentId -&gt; (OpenUnitId, ModuleShape)
</span><a href="#local-6989586621679723088"><span class="hs-identifier hs-var">lookupUid</span></a></span><span> </span><span class="annot"><span class="annottext">AnnotatedId ComponentId
</span><a href="#local-6989586621679723087"><span class="hs-identifier hs-var">dep_aid</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IncludeRenaming
</span><a href="#local-6989586621679723086"><span class="hs-identifier hs-var">rns</span></a></span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679723085"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-148"></span><span>                            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentInclude.html#ComponentInclude"><span class="hs-identifier hs-type">ComponentInclude</span></a></span><span> </span><span id="local-6989586621679723087"><span class="annot"><span class="annottext">AnnotatedId ComponentId
</span><a href="#local-6989586621679723087"><span class="hs-identifier hs-var">dep_aid</span></a></span></span><span> </span><span id="local-6989586621679723086"><span class="annot"><span class="annottext">IncludeRenaming
</span><a href="#local-6989586621679723086"><span class="hs-identifier hs-var">rns</span></a></span></span><span> </span><span id="local-6989586621679723085"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679723085"><span class="hs-identifier hs-var">i</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ComponentInclude ComponentId IncludeRenaming]
</span><a href="#local-6989586621679723102"><span class="hs-identifier hs-var">cid_includes</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-149"></span><span>
</span><span id="line-150"></span><span>        </span><span class="annot"><a href="#local-6989586621679723088"><span class="hs-identifier hs-type">lookupUid</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentId.html#ComponentId"><span class="hs-identifier hs-type">ComponentId</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Backpack.html#OpenUnitId"><span class="hs-identifier hs-type">OpenUnitId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Backpack.ModuleShape.html#ModuleShape"><span class="hs-identifier hs-type">ModuleShape</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-151"></span><span>        </span><span id="local-6989586621679723088"><span class="annot"><span class="annottext">lookupUid :: ComponentId -&gt; (OpenUnitId, ModuleShape)
</span><a href="#local-6989586621679723088"><span class="hs-identifier hs-var hs-var">lookupUid</span></a></span></span><span> </span><span id="local-6989586621679723084"><span class="annot"><span class="annottext">ComponentId
</span><a href="#local-6989586621679723084"><span class="hs-identifier hs-var">cid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(OpenUnitId, ModuleShape)
-&gt; Maybe (OpenUnitId, ModuleShape) -&gt; (OpenUnitId, ModuleShape)
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; (OpenUnitId, ModuleShape)
forall a. HasCallStack =&gt; String -&gt; a
</span><a href="../../base/src/GHC.Err.html#error"><span class="hs-identifier hs-var">error</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;linkComponent: lookupUid&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-152"></span><span>                                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentId
-&gt; LinkedComponentMap -&gt; Maybe (OpenUnitId, ModuleShape)
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">Map.lookup</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentId
</span><a href="#local-6989586621679723084"><span class="hs-identifier hs-var">cid</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponentMap
</span><a href="#local-6989586621679723115"><span class="hs-identifier hs-var">pkg_map</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-153"></span><span>
</span><span id="line-154"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679723079"><span class="annot"><span class="annottext">orErr :: Either [Doc] a -&gt; LogProgress a
</span><a href="#local-6989586621679723079"><span class="hs-identifier hs-var hs-var">orErr</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Right"><span class="hs-identifier hs-type">Right</span></a></span><span> </span><span id="local-6989586621679723078"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679723078"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; LogProgress a
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679723078"><span class="hs-identifier hs-var">x</span></a></span><span>
</span><span id="line-155"></span><span>        </span><span class="annot"><a href="#local-6989586621679723079"><span class="hs-identifier hs-var">orErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span class="hs-special">[</span><span id="local-6989586621679723077"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621679723077"><span class="hs-identifier hs-var">err</span></a></span></span><span class="hs-special">]</span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; LogProgress a
forall a. Doc -&gt; LogProgress a
</span><a href="Distribution.Utils.LogProgress.html#dieProgress"><span class="hs-identifier hs-var">dieProgress</span></a></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621679723077"><span class="hs-identifier hs-var">err</span></a></span><span>
</span><span id="line-156"></span><span>        </span><span class="annot"><a href="#local-6989586621679723079"><span class="hs-identifier hs-var">orErr</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-type">Left</span></a></span><span> </span><span id="local-6989586621679723075"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621679723075"><span class="hs-identifier hs-var">errs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-157"></span><span>            </span><span class="annot"><span class="annottext">Doc -&gt; LogProgress a
forall a. Doc -&gt; LogProgress a
</span><a href="Distribution.Utils.LogProgress.html#dieProgress"><span class="hs-identifier hs-var">dieProgress</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc -&gt; [Doc] -&gt; [Doc]
forall a. a -&gt; [a] -&gt; [a]
</span><a href="../../base/src/Data.OldList.html#intersperse"><span class="hs-identifier hs-var">intersperse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span> </span><span class="hs-comment">-- double newline!</span><span>
</span><span id="line-158"></span><span>                                </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621679723073"><span class="hs-identifier hs-var">err</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679723073"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621679723073"><span class="hs-identifier hs-var">err</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621679723075"><span class="hs-identifier hs-var">errs</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-159"></span><span>
</span><span id="line-160"></span><span>    </span><span class="hs-comment">-- Pre-shaping</span><span>
</span><span id="line-161"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679723072"><span class="annot"><span class="annottext">pre_shape :: PreModuleShape
</span><a href="#local-6989586621679723072"><span class="hs-identifier hs-var hs-var">pre_shape</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[PreModuleShape] -&gt; PreModuleShape
</span><a href="Distribution.Backpack.PreModuleShape.html#mixLinkPreModuleShape"><span class="hs-identifier hs-var">mixLinkPreModuleShape</span></a></span><span> </span><span class="annot"><span class="annottext">([PreModuleShape] -&gt; PreModuleShape)
-&gt; [PreModuleShape] -&gt; PreModuleShape
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-162"></span><span>            </span><span class="annot"><span class="annottext">PreModuleShape :: Set ModuleName -&gt; Set ModuleName -&gt; PreModuleShape
</span><a href="Distribution.Backpack.PreModuleShape.html#PreModuleShape"><span class="hs-identifier hs-type">PreModuleShape</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-163"></span><span>                </span><span class="annot"><span class="annottext">preModShapeProvides :: Set ModuleName
</span><a href="Distribution.Backpack.PreModuleShape.html#preModShapeProvides"><span class="hs-identifier hs-var">preModShapeProvides</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; Set ModuleName
forall a. Ord a =&gt; [a] -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#fromList"><span class="hs-identifier hs-var">Set.fromList</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679723100"><span class="hs-identifier hs-var">src_provs</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; [ModuleName] -&gt; [ModuleName]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679723093"><span class="hs-identifier hs-var">src_hidden</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span>
</span><span id="line-164"></span><span>                </span><span class="annot"><span class="annottext">preModShapeRequires :: Set ModuleName
</span><a href="Distribution.Backpack.PreModuleShape.html#preModShapeRequires"><span class="hs-identifier hs-var">preModShapeRequires</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; Set ModuleName
forall a. Ord a =&gt; [a] -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#fromList"><span class="hs-identifier hs-var">Set.fromList</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679723101"><span class="hs-identifier hs-var">src_reqs</span></a></span><span>
</span><span id="line-165"></span><span>            </span><span class="hs-special">}</span><span> </span><span class="annot"><span class="annottext">PreModuleShape -&gt; [PreModuleShape] -&gt; [PreModuleShape]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">PreModuleShape -&gt; IncludeRenaming -&gt; PreModuleShape
</span><a href="Distribution.Backpack.PreModuleShape.html#renamePreModuleShape"><span class="hs-identifier hs-var">renamePreModuleShape</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleShape -&gt; PreModuleShape
</span><a href="Distribution.Backpack.PreModuleShape.html#toPreModuleShape"><span class="hs-identifier hs-var">toPreModuleShape</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleShape
</span><a href="#local-6989586621679723064"><span class="hs-identifier hs-var">sh</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">IncludeRenaming
</span><a href="#local-6989586621679723063"><span class="hs-identifier hs-var">rns</span></a></span><span>
</span><span id="line-166"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentInclude.html#ComponentInclude"><span class="hs-identifier hs-type">ComponentInclude</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.AnnotatedId.html#AnnotatedId"><span class="hs-identifier hs-type">AnnotatedId</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ann_id :: forall id. AnnotatedId id -&gt; id
</span><a href="Distribution.Types.AnnotatedId.html#ann_id"><span class="hs-identifier hs-var">ann_id</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OpenUnitId
</span><span class="hs-identifier">_</span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679723064"><span class="annot"><span class="annottext">ModuleShape
</span><a href="#local-6989586621679723064"><span class="hs-identifier hs-var">sh</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-special">}</span><span class="hs-special">)</span><span> </span><span id="local-6989586621679723063"><span class="annot"><span class="annottext">IncludeRenaming
</span><a href="#local-6989586621679723063"><span class="hs-identifier hs-var">rns</span></a></span></span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ComponentInclude (OpenUnitId, ModuleShape) IncludeRenaming]
</span><a href="#local-6989586621679723090"><span class="hs-identifier hs-var">unlinked_includes</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-167"></span><span>        </span><span id="local-6989586621679723062"><span class="annot"><span class="annottext">reqs :: Set ModuleName
</span><a href="#local-6989586621679723062"><span class="hs-identifier hs-var hs-var">reqs</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PreModuleShape -&gt; Set ModuleName
</span><a href="Distribution.Backpack.PreModuleShape.html#preModShapeRequires"><span class="hs-identifier hs-var hs-var">preModShapeRequires</span></a></span><span> </span><span class="annot"><span class="annottext">PreModuleShape
</span><a href="#local-6989586621679723072"><span class="hs-identifier hs-var">pre_shape</span></a></span><span>
</span><span id="line-168"></span><span>        </span><span id="local-6989586621679723061"><span class="annot"><span class="annottext">insts :: [(ModuleName, OpenModule)]
</span><a href="#local-6989586621679723061"><span class="hs-identifier hs-var hs-var">insts</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679723060"><span class="hs-identifier hs-var">req</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; OpenModule
</span><a href="Distribution.Backpack.html#OpenModuleVar"><span class="hs-identifier hs-var">OpenModuleVar</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679723060"><span class="hs-identifier hs-var">req</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-169"></span><span>                </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679723060"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679723060"><span class="hs-identifier hs-var">req</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Set ModuleName -&gt; [ModuleName]
forall a. Set a -&gt; [a]
</span><a href="../../containers/src/Data.Set.Internal.html#toList"><span class="hs-identifier hs-var">Set.toList</span></a></span><span> </span><span class="annot"><span class="annottext">Set ModuleName
</span><a href="#local-6989586621679723062"><span class="hs-identifier hs-var">reqs</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-170"></span><span>        </span><span id="local-6989586621679723059"><span class="annot"><span class="annottext">this_uid :: OpenUnitId
</span><a href="#local-6989586621679723059"><span class="hs-identifier hs-var hs-var">this_uid</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ComponentId -&gt; OpenModuleSubst -&gt; OpenUnitId
</span><a href="Distribution.Backpack.html#IndefFullUnitId"><span class="hs-identifier hs-var">IndefFullUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentId
</span><a href="#local-6989586621679723110"><span class="hs-identifier hs-var">this_cid</span></a></span><span> </span><span class="annot"><span class="annottext">(OpenModuleSubst -&gt; OpenUnitId)
-&gt; ([(ModuleName, OpenModule)] -&gt; OpenModuleSubst)
-&gt; [(ModuleName, OpenModule)]
-&gt; OpenUnitId
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">[(ModuleName, OpenModule)] -&gt; OpenModuleSubst
forall k a. Ord k =&gt; [(k, a)] -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#fromList"><span class="hs-identifier hs-var">Map.fromList</span></a></span><span> </span><span class="annot"><span class="annottext">([(ModuleName, OpenModule)] -&gt; OpenUnitId)
-&gt; [(ModuleName, OpenModule)] -&gt; OpenUnitId
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[(ModuleName, OpenModule)]
</span><a href="#local-6989586621679723061"><span class="hs-identifier hs-var">insts</span></a></span><span>
</span><span id="line-171"></span><span>
</span><span id="line-172"></span><span>    </span><span class="hs-comment">-- OK, actually do unification</span><span>
</span><span id="line-173"></span><span>    </span><span class="hs-comment">-- TODO: the unification monad might return errors, in which</span><span>
</span><span id="line-174"></span><span>    </span><span class="hs-comment">-- case we have to deal.  Use monadic bind for now.</span><span>
</span><span id="line-175"></span><span>    </span><span class="hs-special">(</span><span id="local-6989586621679723058"><span class="annot"><span class="annottext">ModuleScope
</span><a href="#local-6989586621679723058"><span class="hs-identifier hs-var">linked_shape0</span></a></span></span><span>  </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Backpack.ModuleScope.html#ModuleScope"><span class="hs-identifier hs-type">ModuleScope</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-176"></span><span>     </span><span id="local-6989586621679723057"><span class="annot"><span class="annottext">[ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="#local-6989586621679723057"><span class="hs-identifier hs-var">linked_includes0</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.ComponentInclude.html#ComponentInclude"><span class="hs-identifier hs-type">ComponentInclude</span></a></span><span> </span><span class="annot"><a href="Distribution.Backpack.html#OpenUnitId"><span class="hs-identifier hs-type">OpenUnitId</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.ModuleRenaming.html#ModuleRenaming"><span class="hs-identifier hs-type">ModuleRenaming</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span>
</span><span id="line-177"></span><span>     </span><span id="local-6989586621679723056"><span class="annot"><span class="annottext">[ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="#local-6989586621679723056"><span class="hs-identifier hs-var">linked_sig_includes0</span></a></span></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.ComponentInclude.html#ComponentInclude"><span class="hs-identifier hs-type">ComponentInclude</span></a></span><span> </span><span class="annot"><a href="Distribution.Backpack.html#OpenUnitId"><span class="hs-identifier hs-type">OpenUnitId</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.ModuleRenaming.html#ModuleRenaming"><span class="hs-identifier hs-type">ModuleRenaming</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-178"></span><span>      </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Either
  [Doc]
  (ModuleScope, [ComponentInclude OpenUnitId ModuleRenaming],
   [ComponentInclude OpenUnitId ModuleRenaming])
-&gt; LogProgress
     (ModuleScope, [ComponentInclude OpenUnitId ModuleRenaming],
      [ComponentInclude OpenUnitId ModuleRenaming])
forall {a}. Either [Doc] a -&gt; LogProgress a
</span><a href="#local-6989586621679723079"><span class="hs-identifier hs-var">orErr</span></a></span><span> </span><span class="annot"><span class="annottext">(Either
   [Doc]
   (ModuleScope, [ComponentInclude OpenUnitId ModuleRenaming],
    [ComponentInclude OpenUnitId ModuleRenaming])
 -&gt; LogProgress
      (ModuleScope, [ComponentInclude OpenUnitId ModuleRenaming],
       [ComponentInclude OpenUnitId ModuleRenaming]))
-&gt; Either
     [Doc]
     (ModuleScope, [ComponentInclude OpenUnitId ModuleRenaming],
      [ComponentInclude OpenUnitId ModuleRenaming])
-&gt; LogProgress
     (ModuleScope, [ComponentInclude OpenUnitId ModuleRenaming],
      [ComponentInclude OpenUnitId ModuleRenaming])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
-&gt; ComponentId
-&gt; FullDb
-&gt; (forall s.
    UnifyM
      s
      (ModuleScope, [ComponentInclude OpenUnitId ModuleRenaming],
       [ComponentInclude OpenUnitId ModuleRenaming]))
-&gt; Either
     [Doc]
     (ModuleScope, [ComponentInclude OpenUnitId ModuleRenaming],
      [ComponentInclude OpenUnitId ModuleRenaming])
forall a.
Verbosity
-&gt; ComponentId
-&gt; FullDb
-&gt; (forall s. UnifyM s a)
-&gt; Either [Doc] a
</span><a href="Distribution.Backpack.UnifyM.html#runUnifyM"><span class="hs-identifier hs-var">runUnifyM</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679723118"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentId
</span><a href="#local-6989586621679723110"><span class="hs-identifier hs-var">this_cid</span></a></span><span> </span><span class="annot"><span class="annottext">FullDb
</span><a href="#local-6989586621679723117"><span class="hs-identifier hs-var">db</span></a></span><span> </span><span class="annot"><span class="annottext">((forall s.
  UnifyM
    s
    (ModuleScope, [ComponentInclude OpenUnitId ModuleRenaming],
     [ComponentInclude OpenUnitId ModuleRenaming]))
 -&gt; Either
      [Doc]
      (ModuleScope, [ComponentInclude OpenUnitId ModuleRenaming],
       [ComponentInclude OpenUnitId ModuleRenaming]))
-&gt; (forall s.
    UnifyM
      s
      (ModuleScope, [ComponentInclude OpenUnitId ModuleRenaming],
       [ComponentInclude OpenUnitId ModuleRenaming]))
-&gt; Either
     [Doc]
     (ModuleScope, [ComponentInclude OpenUnitId ModuleRenaming],
      [ComponentInclude OpenUnitId ModuleRenaming])
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-179"></span><span>        </span><span class="hs-comment">-- The unification monad is implemented using mutable</span><span>
</span><span id="line-180"></span><span>        </span><span class="hs-comment">-- references.  Thus, we must convert our *pure* data</span><span>
</span><span id="line-181"></span><span>        </span><span class="hs-comment">-- structures into mutable ones to perform unification.</span><span>
</span><span id="line-182"></span><span>
</span><span id="line-183"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679723310"><span class="annot"><a href="#local-6989586621679723028"><span class="hs-identifier hs-type">convertMod</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Backpack.ModuleScope.html#ModuleSource"><span class="hs-identifier hs-type">ModuleSource</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Backpack.UnifyM.html#UnifyM"><span class="hs-identifier hs-type">UnifyM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679723310"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Backpack.UnifyM.html#ModuleScopeU"><span class="hs-identifier hs-type">ModuleScopeU</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679723310"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-184"></span><span>            </span><span id="local-6989586621679723028"><span class="annot"><span class="annottext">convertMod :: forall s.
(ModuleName -&gt; ModuleSource)
-&gt; ModuleName -&gt; UnifyM s (ModuleScopeU s)
</span><a href="#local-6989586621679723028"><span class="hs-identifier hs-var hs-var">convertMod</span></a></span></span><span> </span><span id="local-6989586621679723025"><span class="annot"><span class="annottext">ModuleName -&gt; ModuleSource
</span><a href="#local-6989586621679723025"><span class="hs-identifier hs-var">from</span></a></span></span><span> </span><span id="local-6989586621679723024"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679723024"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-185"></span><span>                </span><span id="local-6989586621679723023"><span class="annot"><span class="annottext">ModuleU s
</span><a href="#local-6989586621679723023"><span class="hs-identifier hs-var">m_u</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">OpenModule -&gt; UnifyM s (ModuleU s)
forall s. OpenModule -&gt; UnifyM s (ModuleU s)
</span><a href="Distribution.Backpack.UnifyM.html#convertModule"><span class="hs-identifier hs-var">convertModule</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">OpenUnitId -&gt; ModuleName -&gt; OpenModule
</span><a href="Distribution.Backpack.html#OpenModule"><span class="hs-identifier hs-var">OpenModule</span></a></span><span> </span><span class="annot"><span class="annottext">OpenUnitId
</span><a href="#local-6989586621679723059"><span class="hs-identifier hs-var">this_uid</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679723024"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-186"></span><span>                </span><span class="annot"><span class="annottext">ModuleScopeU s -&gt; UnifyM s (ModuleScopeU s)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName
-&gt; [WithSource (ModuleU s)]
-&gt; Map ModuleName [WithSource (ModuleU s)]
forall k a. k -&gt; a -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#singleton"><span class="hs-identifier hs-var">Map.singleton</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679723024"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">ModuleSource -&gt; ModuleU s -&gt; WithSource (ModuleU s)
forall a. ModuleSource -&gt; a -&gt; WithSource a
</span><a href="Distribution.Backpack.ModuleScope.html#WithSource"><span class="hs-identifier hs-var">WithSource</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; ModuleSource
</span><a href="#local-6989586621679723025"><span class="hs-identifier hs-var">from</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679723024"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ModuleU s
</span><a href="#local-6989586621679723023"><span class="hs-identifier hs-var">m_u</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Map ModuleName [WithSource (ModuleU s)]
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">Map.empty</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-187"></span><span>        </span><span class="hs-comment">-- Handle 'exposed-modules'</span><span>
</span><span id="line-188"></span><span>        </span><span id="local-6989586621679723017"><span class="annot"><span class="annottext">[ModuleScopeU s]
</span><a href="#local-6989586621679723017"><span class="hs-identifier hs-var">exposed_mod_shapes_u</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(ModuleName -&gt; UnifyM s (ModuleScopeU s))
-&gt; [ModuleName] -&gt; UnifyM s [ModuleScopeU s]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ModuleName -&gt; ModuleSource)
-&gt; ModuleName -&gt; UnifyM s (ModuleScopeU s)
forall s.
(ModuleName -&gt; ModuleSource)
-&gt; ModuleName -&gt; UnifyM s (ModuleScopeU s)
</span><a href="#local-6989586621679723028"><span class="hs-identifier hs-var">convertMod</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; ModuleSource
</span><a href="Distribution.Backpack.ModuleScope.html#FromExposedModules"><span class="hs-identifier hs-var">FromExposedModules</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679723100"><span class="hs-identifier hs-var">src_provs</span></a></span><span>
</span><span id="line-189"></span><span>        </span><span class="hs-comment">-- Handle 'other-modules'</span><span>
</span><span id="line-190"></span><span>        </span><span id="local-6989586621679723014"><span class="annot"><span class="annottext">[ModuleScopeU s]
</span><a href="#local-6989586621679723014"><span class="hs-identifier hs-var">other_mod_shapes_u</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(ModuleName -&gt; UnifyM s (ModuleScopeU s))
-&gt; [ModuleName] -&gt; UnifyM s [ModuleScopeU s]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ModuleName -&gt; ModuleSource)
-&gt; ModuleName -&gt; UnifyM s (ModuleScopeU s)
forall s.
(ModuleName -&gt; ModuleSource)
-&gt; ModuleName -&gt; UnifyM s (ModuleScopeU s)
</span><a href="#local-6989586621679723028"><span class="hs-identifier hs-var">convertMod</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; ModuleSource
</span><a href="Distribution.Backpack.ModuleScope.html#FromOtherModules"><span class="hs-identifier hs-var">FromOtherModules</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679723093"><span class="hs-identifier hs-var">src_hidden</span></a></span><span>
</span><span id="line-191"></span><span>
</span><span id="line-192"></span><span>        </span><span class="hs-comment">-- Handle 'signatures'</span><span>
</span><span id="line-193"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679723295"><span class="annot"><a href="#local-6989586621679723012"><span class="hs-identifier hs-type">convertReq</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.ModuleName.html#ModuleName"><span class="hs-identifier hs-type">ModuleName</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Backpack.UnifyM.html#UnifyM"><span class="hs-identifier hs-type">UnifyM</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679723295"><span class="hs-identifier hs-type">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Backpack.UnifyM.html#ModuleScopeU"><span class="hs-identifier hs-type">ModuleScopeU</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679723295"><span class="hs-identifier hs-type">s</span></a></span><span class="hs-special">)</span></span><span>
</span><span id="line-194"></span><span>            </span><span id="local-6989586621679723012"><span class="annot"><span class="annottext">convertReq :: forall s. ModuleName -&gt; UnifyM s (ModuleScopeU s)
</span><a href="#local-6989586621679723012"><span class="hs-identifier hs-var hs-var">convertReq</span></a></span></span><span> </span><span id="local-6989586621679723009"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679723009"><span class="hs-identifier hs-var">req</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-195"></span><span>                </span><span id="local-6989586621679723008"><span class="annot"><span class="annottext">ModuleU s
</span><a href="#local-6989586621679723008"><span class="hs-identifier hs-var">req_u</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">OpenModule -&gt; UnifyM s (ModuleU s)
forall s. OpenModule -&gt; UnifyM s (ModuleU s)
</span><a href="Distribution.Backpack.UnifyM.html#convertModule"><span class="hs-identifier hs-var">convertModule</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; OpenModule
</span><a href="Distribution.Backpack.html#OpenModuleVar"><span class="hs-identifier hs-var">OpenModuleVar</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679723009"><span class="hs-identifier hs-var">req</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-196"></span><span>                </span><span class="annot"><span class="annottext">ModuleScopeU s -&gt; UnifyM s (ModuleScopeU s)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Map ModuleName [ModuleWithSourceU s]
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">Map.empty</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ModuleName
-&gt; [ModuleWithSourceU s] -&gt; Map ModuleName [ModuleWithSourceU s]
forall k a. k -&gt; a -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#singleton"><span class="hs-identifier hs-var">Map.singleton</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679723009"><span class="hs-identifier hs-var">req</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">ModuleSource -&gt; ModuleU s -&gt; ModuleWithSourceU s
forall a. ModuleSource -&gt; a -&gt; WithSource a
</span><a href="Distribution.Backpack.ModuleScope.html#WithSource"><span class="hs-identifier hs-var">WithSource</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; ModuleSource
</span><a href="Distribution.Backpack.ModuleScope.html#FromSignatures"><span class="hs-identifier hs-var">FromSignatures</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679723009"><span class="hs-identifier hs-var">req</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">ModuleU s
</span><a href="#local-6989586621679723008"><span class="hs-identifier hs-var">req_u</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-197"></span><span>        </span><span id="local-6989586621679723006"><span class="annot"><span class="annottext">[ModuleScopeU s]
</span><a href="#local-6989586621679723006"><span class="hs-identifier hs-var">req_shapes_u</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(ModuleName -&gt; UnifyM s (ModuleScopeU s))
-&gt; [ModuleName] -&gt; UnifyM s [ModuleScopeU s]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; UnifyM s (ModuleScopeU s)
forall s. ModuleName -&gt; UnifyM s (ModuleScopeU s)
</span><a href="#local-6989586621679723012"><span class="hs-identifier hs-var">convertReq</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679723101"><span class="hs-identifier hs-var">src_reqs</span></a></span><span>
</span><span id="line-198"></span><span>
</span><span id="line-199"></span><span>        </span><span class="hs-comment">-- Handle 'mixins'</span><span>
</span><span id="line-200"></span><span>        </span><span class="hs-special">(</span><span id="local-6989586621679723005"><span class="annot"><span class="annottext">[ModuleScopeU s]
</span><a href="#local-6989586621679723005"><span class="hs-identifier hs-var">incl_shapes_u</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679723004"><span class="annot"><span class="annottext">[Either
   (ComponentInclude (UnitIdU s) ModuleRenaming)
   (ComponentInclude (UnitIdU s) ModuleRenaming)]
</span><a href="#local-6989586621679723004"><span class="hs-identifier hs-var">all_includes_u</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">([(ModuleScopeU s,
   Either
     (ComponentInclude (UnitIdU s) ModuleRenaming)
     (ComponentInclude (UnitIdU s) ModuleRenaming))]
 -&gt; ([ModuleScopeU s],
     [Either
        (ComponentInclude (UnitIdU s) ModuleRenaming)
        (ComponentInclude (UnitIdU s) ModuleRenaming)]))
-&gt; UnifyM
     s
     [(ModuleScopeU s,
       Either
         (ComponentInclude (UnitIdU s) ModuleRenaming)
         (ComponentInclude (UnitIdU s) ModuleRenaming))]
-&gt; UnifyM
     s
     ([ModuleScopeU s],
      [Either
         (ComponentInclude (UnitIdU s) ModuleRenaming)
         (ComponentInclude (UnitIdU s) ModuleRenaming)])
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">[(ModuleScopeU s,
  Either
    (ComponentInclude (UnitIdU s) ModuleRenaming)
    (ComponentInclude (UnitIdU s) ModuleRenaming))]
-&gt; ([ModuleScopeU s],
    [Either
       (ComponentInclude (UnitIdU s) ModuleRenaming)
       (ComponentInclude (UnitIdU s) ModuleRenaming)])
forall a b. [(a, b)] -&gt; ([a], [b])
</span><a href="../../base/src/GHC.List.html#unzip"><span class="hs-identifier hs-var">unzip</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ComponentInclude (OpenUnitId, ModuleShape) IncludeRenaming
 -&gt; UnifyM
      s
      (ModuleScopeU s,
       Either
         (ComponentInclude (UnitIdU s) ModuleRenaming)
         (ComponentInclude (UnitIdU s) ModuleRenaming)))
-&gt; [ComponentInclude (OpenUnitId, ModuleShape) IncludeRenaming]
-&gt; UnifyM
     s
     [(ModuleScopeU s,
       Either
         (ComponentInclude (UnitIdU s) ModuleRenaming)
         (ComponentInclude (UnitIdU s) ModuleRenaming))]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInclude (OpenUnitId, ModuleShape) IncludeRenaming
-&gt; UnifyM
     s
     (ModuleScopeU s,
      Either
        (ComponentInclude (UnitIdU s) ModuleRenaming)
        (ComponentInclude (UnitIdU s) ModuleRenaming))
forall s.
ComponentInclude (OpenUnitId, ModuleShape) IncludeRenaming
-&gt; UnifyM
     s
     (ModuleScopeU s,
      Either
        (ComponentInclude (UnitIdU s) ModuleRenaming)
        (ComponentInclude (UnitIdU s) ModuleRenaming))
</span><a href="Distribution.Backpack.UnifyM.html#convertInclude"><span class="hs-identifier hs-var">convertInclude</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInclude (OpenUnitId, ModuleShape) IncludeRenaming]
</span><a href="#local-6989586621679723090"><span class="hs-identifier hs-var">unlinked_includes</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-201"></span><span>
</span><span id="line-202"></span><span>        </span><span class="annot"><span class="annottext">UnifyM s ()
forall s. UnifyM s ()
</span><a href="Distribution.Backpack.UnifyM.html#failIfErrs"><span class="hs-identifier hs-var">failIfErrs</span></a></span><span> </span><span class="hs-comment">-- Prevent error cascade</span><span>
</span><span id="line-203"></span><span>        </span><span class="hs-comment">-- Mix-in link everything!  mixLink is the real workhorse.</span><span>
</span><span id="line-204"></span><span>        </span><span id="local-6989586621679723000"><span class="annot"><span class="annottext">ModuleScopeU s
</span><a href="#local-6989586621679723000"><span class="hs-identifier hs-var">shape_u</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ModuleScopeU s] -&gt; UnifyM s (ModuleScopeU s)
forall s. [ModuleScopeU s] -&gt; UnifyM s (ModuleScopeU s)
</span><a href="Distribution.Backpack.MixLink.html#mixLink"><span class="hs-identifier hs-var">mixLink</span></a></span><span> </span><span class="annot"><span class="annottext">([ModuleScopeU s] -&gt; UnifyM s (ModuleScopeU s))
-&gt; [ModuleScopeU s] -&gt; UnifyM s (ModuleScopeU s)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleScopeU s]
</span><a href="#local-6989586621679723017"><span class="hs-identifier hs-var">exposed_mod_shapes_u</span></a></span><span>
</span><span id="line-205"></span><span>                          </span><span class="annot"><span class="annottext">[ModuleScopeU s] -&gt; [ModuleScopeU s] -&gt; [ModuleScopeU s]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleScopeU s]
</span><a href="#local-6989586621679723014"><span class="hs-identifier hs-var">other_mod_shapes_u</span></a></span><span>
</span><span id="line-206"></span><span>                          </span><span class="annot"><span class="annottext">[ModuleScopeU s] -&gt; [ModuleScopeU s] -&gt; [ModuleScopeU s]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleScopeU s]
</span><a href="#local-6989586621679723006"><span class="hs-identifier hs-var">req_shapes_u</span></a></span><span>
</span><span id="line-207"></span><span>                          </span><span class="annot"><span class="annottext">[ModuleScopeU s] -&gt; [ModuleScopeU s] -&gt; [ModuleScopeU s]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleScopeU s]
</span><a href="#local-6989586621679723005"><span class="hs-identifier hs-var">incl_shapes_u</span></a></span><span>
</span><span id="line-208"></span><span>
</span><span id="line-209"></span><span>        </span><span class="hs-comment">-- src_reqs_u &lt;- traverse convertReq src_reqs</span><span>
</span><span id="line-210"></span><span>        </span><span class="hs-comment">-- Read out all the final results by converting back</span><span>
</span><span id="line-211"></span><span>        </span><span class="hs-comment">-- into a pure representation.</span><span>
</span><span id="line-212"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679722996"><span class="annot"><span class="annottext">convertIncludeU :: ComponentInclude (UnitIdU s) rn
-&gt; UnifyM s (ComponentInclude OpenUnitId rn)
</span><a href="#local-6989586621679722996"><span class="hs-identifier hs-var hs-var">convertIncludeU</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ComponentInclude.html#ComponentInclude"><span class="hs-identifier hs-type">ComponentInclude</span></a></span><span> </span><span id="local-6989586621679722995"><span class="annot"><span class="annottext">AnnotatedId (UnitIdU s)
</span><a href="#local-6989586621679722995"><span class="hs-identifier hs-var">dep_aid</span></a></span></span><span> </span><span id="local-6989586621679722994"><span class="annot"><span class="annottext">rn
</span><a href="#local-6989586621679722994"><span class="hs-identifier hs-var">rns</span></a></span></span><span> </span><span id="local-6989586621679722993"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679722993"><span class="hs-identifier hs-var">i</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-213"></span><span>                </span><span id="local-6989586621679722992"><span class="annot"><span class="annottext">OpenUnitId
</span><a href="#local-6989586621679722992"><span class="hs-identifier hs-var">uid</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">UnitIdU s -&gt; UnifyM s OpenUnitId
forall s. UnitIdU s -&gt; UnifyM s OpenUnitId
</span><a href="Distribution.Backpack.UnifyM.html#convertUnitIdU"><span class="hs-identifier hs-var">convertUnitIdU</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">AnnotatedId (UnitIdU s) -&gt; UnitIdU s
forall id. AnnotatedId id -&gt; id
</span><a href="Distribution.Types.AnnotatedId.html#ann_id"><span class="hs-identifier hs-var hs-var">ann_id</span></a></span><span> </span><span class="annot"><span class="annottext">AnnotatedId (UnitIdU s)
</span><a href="#local-6989586621679722995"><span class="hs-identifier hs-var">dep_aid</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-214"></span><span>                </span><span class="annot"><span class="annottext">ComponentInclude OpenUnitId rn
-&gt; UnifyM s (ComponentInclude OpenUnitId rn)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentInclude :: forall id rn.
AnnotatedId id -&gt; rn -&gt; Bool -&gt; ComponentInclude id rn
</span><a href="Distribution.Types.ComponentInclude.html#ComponentInclude"><span class="hs-identifier hs-type">ComponentInclude</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-215"></span><span>                            </span><span class="annot"><span class="annottext">ci_ann_id :: AnnotatedId OpenUnitId
</span><a href="Distribution.Types.ComponentInclude.html#ci_ann_id"><span class="hs-identifier hs-var">ci_ann_id</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AnnotatedId (UnitIdU s)
</span><a href="#local-6989586621679722995"><span class="hs-identifier hs-var">dep_aid</span></a></span><span> </span><span class="hs-special">{</span><span> </span><span class="annot"><span class="annottext">ann_id :: OpenUnitId
</span><a href="Distribution.Types.AnnotatedId.html#ann_id"><span class="hs-identifier hs-var">ann_id</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OpenUnitId
</span><a href="#local-6989586621679722992"><span class="hs-identifier hs-var">uid</span></a></span><span> </span><span class="hs-special">}</span><span class="hs-special">,</span><span>
</span><span id="line-216"></span><span>                            </span><span class="annot"><span class="annottext">ci_renaming :: rn
</span><a href="Distribution.Types.ComponentInclude.html#ci_renaming"><span class="hs-identifier hs-var">ci_renaming</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">rn
</span><a href="#local-6989586621679722994"><span class="hs-identifier hs-var">rns</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-217"></span><span>                            </span><span class="annot"><span class="annottext">ci_implicit :: Bool
</span><a href="Distribution.Types.ComponentInclude.html#ci_implicit"><span class="hs-identifier hs-var">ci_implicit</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679722993"><span class="hs-identifier hs-var">i</span></a></span><span>
</span><span id="line-218"></span><span>                        </span><span class="hs-special">}</span><span class="hs-special">)</span><span>
</span><span id="line-219"></span><span>        </span><span id="local-6989586621679722988"><span class="annot"><span class="annottext">ModuleScope
</span><a href="#local-6989586621679722988"><span class="hs-identifier hs-var">shape</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">ModuleScopeU s -&gt; UnifyM s ModuleScope
forall s. ModuleScopeU s -&gt; UnifyM s ModuleScope
</span><a href="Distribution.Backpack.UnifyM.html#convertModuleScopeU"><span class="hs-identifier hs-var">convertModuleScopeU</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleScopeU s
</span><a href="#local-6989586621679723000"><span class="hs-identifier hs-var">shape_u</span></a></span><span>
</span><span id="line-220"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679722986"><span class="annot"><span class="annottext">[ComponentInclude (UnitIdU s) ModuleRenaming]
</span><a href="#local-6989586621679722986"><span class="hs-identifier hs-var">includes_u</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679722985"><span class="annot"><span class="annottext">[ComponentInclude (UnitIdU s) ModuleRenaming]
</span><a href="#local-6989586621679722985"><span class="hs-identifier hs-var">sig_includes_u</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Either
   (ComponentInclude (UnitIdU s) ModuleRenaming)
   (ComponentInclude (UnitIdU s) ModuleRenaming)]
-&gt; ([ComponentInclude (UnitIdU s) ModuleRenaming],
    [ComponentInclude (UnitIdU s) ModuleRenaming])
forall a b. [Either a b] -&gt; ([a], [b])
</span><a href="../../base/src/Data.Either.html#partitionEithers"><span class="hs-identifier hs-var">partitionEithers</span></a></span><span> </span><span class="annot"><span class="annottext">[Either
   (ComponentInclude (UnitIdU s) ModuleRenaming)
   (ComponentInclude (UnitIdU s) ModuleRenaming)]
</span><a href="#local-6989586621679723004"><span class="hs-identifier hs-var">all_includes_u</span></a></span><span>
</span><span id="line-221"></span><span>        </span><span id="local-6989586621679722983"><span class="annot"><span class="annottext">[ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="#local-6989586621679722983"><span class="hs-identifier hs-var">incls</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(ComponentInclude (UnitIdU s) ModuleRenaming
 -&gt; UnifyM s (ComponentInclude OpenUnitId ModuleRenaming))
-&gt; [ComponentInclude (UnitIdU s) ModuleRenaming]
-&gt; UnifyM s [ComponentInclude OpenUnitId ModuleRenaming]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInclude (UnitIdU s) ModuleRenaming
-&gt; UnifyM s (ComponentInclude OpenUnitId ModuleRenaming)
forall {s} {rn}.
ComponentInclude (UnitIdU s) rn
-&gt; UnifyM s (ComponentInclude OpenUnitId rn)
</span><a href="#local-6989586621679722996"><span class="hs-identifier hs-var">convertIncludeU</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInclude (UnitIdU s) ModuleRenaming]
</span><a href="#local-6989586621679722986"><span class="hs-identifier hs-var">includes_u</span></a></span><span>
</span><span id="line-222"></span><span>        </span><span id="local-6989586621679722982"><span class="annot"><span class="annottext">[ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="#local-6989586621679722982"><span class="hs-identifier hs-var">sig_incls</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(ComponentInclude (UnitIdU s) ModuleRenaming
 -&gt; UnifyM s (ComponentInclude OpenUnitId ModuleRenaming))
-&gt; [ComponentInclude (UnitIdU s) ModuleRenaming]
-&gt; UnifyM s [ComponentInclude OpenUnitId ModuleRenaming]
forall (t :: * -&gt; *) (f :: * -&gt; *) a b.
(Traversable t, Applicative f) =&gt;
(a -&gt; f b) -&gt; t a -&gt; f (t b)
</span><a href="../../base/src/Data.Traversable.html#traverse"><span class="hs-identifier hs-var">traverse</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentInclude (UnitIdU s) ModuleRenaming
-&gt; UnifyM s (ComponentInclude OpenUnitId ModuleRenaming)
forall {s} {rn}.
ComponentInclude (UnitIdU s) rn
-&gt; UnifyM s (ComponentInclude OpenUnitId rn)
</span><a href="#local-6989586621679722996"><span class="hs-identifier hs-var">convertIncludeU</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInclude (UnitIdU s) ModuleRenaming]
</span><a href="#local-6989586621679722985"><span class="hs-identifier hs-var">sig_includes_u</span></a></span><span>
</span><span id="line-223"></span><span>        </span><span class="annot"><span class="annottext">(ModuleScope, [ComponentInclude OpenUnitId ModuleRenaming],
 [ComponentInclude OpenUnitId ModuleRenaming])
-&gt; UnifyM
     s
     (ModuleScope, [ComponentInclude OpenUnitId ModuleRenaming],
      [ComponentInclude OpenUnitId ModuleRenaming])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleScope
</span><a href="#local-6989586621679722988"><span class="hs-identifier hs-var">shape</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="#local-6989586621679722983"><span class="hs-identifier hs-var">incls</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="#local-6989586621679722982"><span class="hs-identifier hs-var">sig_incls</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-224"></span><span>
</span><span id="line-225"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679722981"><span class="annot"><span class="annottext">isNotLib :: Component -&gt; Bool
</span><a href="#local-6989586621679722981"><span class="hs-identifier hs-var hs-var">isNotLib</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.Component.html#CLib"><span class="hs-identifier hs-type">CLib</span></a></span><span> </span><span class="annot"><span class="annottext">Library
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">False</span></span><span>
</span><span id="line-226"></span><span>        </span><span class="annot"><a href="#local-6989586621679722981"><span class="hs-identifier hs-var">isNotLib</span></a></span><span> </span><span class="annot"><span class="annottext">Component
</span><span class="hs-identifier">_</span></span><span>        </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><span class="hs-identifier hs-var">True</span></span><span>
</span><span id="line-227"></span><span>    </span><span class="annot"><span class="annottext">Bool -&gt; LogProgress () -&gt; LogProgress ()
forall (f :: * -&gt; *). Applicative f =&gt; Bool -&gt; f () -&gt; f ()
</span><a href="../../base/src/GHC.Base.html#when"><span class="hs-identifier hs-var">when</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Set ModuleName -&gt; Bool
forall a. Set a -&gt; Bool
</span><a href="../../containers/src/Data.Set.Internal.html#null"><span class="hs-identifier hs-var">Set.null</span></a></span><span> </span><span class="annot"><span class="annottext">Set ModuleName
</span><a href="#local-6989586621679723062"><span class="hs-identifier hs-var">reqs</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">Component -&gt; Bool
</span><a href="#local-6989586621679722981"><span class="hs-identifier hs-var">isNotLib</span></a></span><span> </span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679723108"><span class="hs-identifier hs-var">component</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(LogProgress () -&gt; LogProgress ())
-&gt; LogProgress () -&gt; LogProgress ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-228"></span><span>        </span><span class="annot"><span class="annottext">Doc -&gt; LogProgress ()
forall a. Doc -&gt; LogProgress a
</span><a href="Distribution.Utils.LogProgress.html#dieProgress"><span class="hs-identifier hs-var">dieProgress</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; LogProgress ()) -&gt; Doc -&gt; LogProgress ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-229"></span><span>            </span><span class="annot"><span class="annottext">Doc -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Non-library component has unfilled requirements:&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-230"></span><span>                </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">4</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">ModuleName -&gt; Doc
forall a. Pretty a =&gt; a -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var">pretty</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722976"><span class="hs-identifier hs-var">req</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679722976"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722976"><span class="hs-identifier hs-var">req</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Set ModuleName -&gt; [ModuleName]
forall a. Set a -&gt; [a]
</span><a href="../../containers/src/Data.Set.Internal.html#toList"><span class="hs-identifier hs-var">Set.toList</span></a></span><span> </span><span class="annot"><span class="annottext">Set ModuleName
</span><a href="#local-6989586621679723062"><span class="hs-identifier hs-var">reqs</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-231"></span><span>
</span><span id="line-232"></span><span>    </span><span class="hs-comment">-- NB: do NOT include hidden modules here: GHC 7.10's ghc-pkg</span><span>
</span><span id="line-233"></span><span>    </span><span class="hs-comment">-- won't allow it (since someone could directly synthesize</span><span>
</span><span id="line-234"></span><span>    </span><span class="hs-comment">-- an 'InstalledPackageInfo' that violates abstraction.)</span><span>
</span><span id="line-235"></span><span>    </span><span class="hs-comment">-- Though, maybe it should be relaxed?</span><span>
</span><span id="line-236"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679722975"><span class="annot"><span class="annottext">src_hidden_set :: Set ModuleName
</span><a href="#local-6989586621679722975"><span class="hs-identifier hs-var hs-var">src_hidden_set</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ModuleName] -&gt; Set ModuleName
forall a. Ord a =&gt; [a] -&gt; Set a
</span><a href="../../containers/src/Data.Set.Internal.html#fromList"><span class="hs-identifier hs-var">Set.fromList</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679723093"><span class="hs-identifier hs-var">src_hidden</span></a></span><span>
</span><span id="line-237"></span><span>        </span><span id="local-6989586621679722974"><span class="annot"><span class="annottext">linked_shape :: ModuleScope
</span><a href="#local-6989586621679722974"><span class="hs-identifier hs-var hs-var">linked_shape</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleScope
</span><a href="#local-6989586621679723058"><span class="hs-identifier hs-var">linked_shape0</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-238"></span><span>            </span><span class="annot"><span class="annottext">modScopeProvides :: ModuleProvides
</span><a href="Distribution.Backpack.ModuleScope.html#modScopeProvides"><span class="hs-identifier hs-var">modScopeProvides</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-239"></span><span>                </span><span class="hs-comment">-- Would rather use withoutKeys but need BC</span><span>
</span><span id="line-240"></span><span>                </span><span class="annot"><span class="annottext">(ModuleName -&gt; [ModuleWithSource] -&gt; Bool)
-&gt; ModuleProvides -&gt; ModuleProvides
forall k a. (k -&gt; a -&gt; Bool) -&gt; Map k a -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#filterWithKey"><span class="hs-identifier hs-var">Map.filterWithKey</span></a></span><span>
</span><span id="line-241"></span><span>                    </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679722971"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722971"><span class="hs-identifier hs-var">k</span></a></span></span><span> </span><span class="annot"><span class="annottext">[ModuleWithSource]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722971"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; Set ModuleName -&gt; Bool
forall a. Ord a =&gt; a -&gt; Set a -&gt; Bool
</span><a href="../../containers/src/Data.Set.Internal.html#member"><span class="hs-operator hs-var">`Set.member`</span></a></span><span> </span><span class="annot"><span class="annottext">Set ModuleName
</span><a href="#local-6989586621679722975"><span class="hs-identifier hs-var">src_hidden_set</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-242"></span><span>                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleScope -&gt; ModuleProvides
</span><a href="Distribution.Backpack.ModuleScope.html#modScopeProvides"><span class="hs-identifier hs-var hs-var">modScopeProvides</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleScope
</span><a href="#local-6989586621679723058"><span class="hs-identifier hs-var">linked_shape0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-243"></span><span>            </span><span class="hs-special">}</span><span>
</span><span id="line-244"></span><span>
</span><span id="line-245"></span><span>    </span><span class="hs-comment">-- OK, compute the reexports</span><span>
</span><span id="line-246"></span><span>    </span><span class="hs-comment">-- TODO: This code reports the errors for reexports one reexport at</span><span>
</span><span id="line-247"></span><span>    </span><span class="hs-comment">-- a time.  Better to collect them all up and report them all at</span><span>
</span><span id="line-248"></span><span>    </span><span class="hs-comment">-- once.</span><span>
</span><span id="line-249"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679723273"><span class="annot"><a href="#local-6989586621679722969"><span class="hs-identifier hs-type">hdl</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="../../base/src/Data.Either.html#Either"><span class="hs-identifier hs-type">Either</span></a></span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679723273"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Utils.LogProgress.html#LogProgress"><span class="hs-identifier hs-type">LogProgress</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="#local-6989586621679723273"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">]</span></span><span>
</span><span id="line-250"></span><span>        </span><span id="local-6989586621679722969"><span class="annot"><span class="annottext">hdl :: forall a. [Either Doc a] -&gt; LogProgress [a]
</span><a href="#local-6989586621679722969"><span class="hs-identifier hs-var hs-var">hdl</span></a></span></span><span> </span><span id="local-6989586621679722967"><span class="annot"><span class="annottext">[Either Doc a]
</span><a href="#local-6989586621679722967"><span class="hs-identifier hs-var">es</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-251"></span><span>            </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">[Either Doc a] -&gt; ([Doc], [a])
forall a b. [Either a b] -&gt; ([a], [b])
</span><a href="../../base/src/Data.Either.html#partitionEithers"><span class="hs-identifier hs-var">partitionEithers</span></a></span><span> </span><span class="annot"><span class="annottext">[Either Doc a]
</span><a href="#local-6989586621679722967"><span class="hs-identifier hs-var">es</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-252"></span><span>                </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span id="local-6989586621679722966"><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679722966"><span class="hs-identifier hs-var">rs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">[a] -&gt; LogProgress [a]
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">[a]
</span><a href="#local-6989586621679722966"><span class="hs-identifier hs-var">rs</span></a></span><span>
</span><span id="line-253"></span><span>                </span><span class="hs-special">(</span><span id="local-6989586621679722965"><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621679722965"><span class="hs-identifier hs-var">ls</span></a></span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[a]
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-254"></span><span>                    </span><span class="annot"><span class="annottext">Doc -&gt; LogProgress [a]
forall a. Doc -&gt; LogProgress a
</span><a href="Distribution.Utils.LogProgress.html#dieProgress"><span class="hs-identifier hs-var">dieProgress</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; LogProgress [a]) -&gt; Doc -&gt; LogProgress [a]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-255"></span><span>                     </span><span class="annot"><span class="annottext">Doc -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Problem with module re-exports:&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-256"></span><span>                        </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">Doc -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span> </span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621679722964"><span class="hs-identifier hs-var">l</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679722964"><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621679722964"><span class="hs-identifier hs-var">l</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621679722965"><span class="hs-identifier hs-var">ls</span></a></span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-257"></span><span>    </span><span id="local-6989586621679722963"><span class="annot"><span class="annottext">[(ModuleName, OpenModule)]
</span><a href="#local-6989586621679722963"><span class="hs-identifier hs-var">reexports_list</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[Either Doc (ModuleName, OpenModule)]
-&gt; LogProgress [(ModuleName, OpenModule)]
forall a. [Either Doc a] -&gt; LogProgress [a]
</span><a href="#local-6989586621679722969"><span class="hs-identifier hs-var">hdl</span></a></span><span> </span><span class="annot"><span class="annottext">([Either Doc (ModuleName, OpenModule)]
 -&gt; LogProgress [(ModuleName, OpenModule)])
-&gt; ((ModuleReexport -&gt; Either Doc (ModuleName, OpenModule))
    -&gt; [Either Doc (ModuleName, OpenModule)])
-&gt; (ModuleReexport -&gt; Either Doc (ModuleName, OpenModule))
-&gt; LogProgress [(ModuleName, OpenModule)]
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((ModuleReexport -&gt; Either Doc (ModuleName, OpenModule))
 -&gt; [ModuleReexport] -&gt; [Either Doc (ModuleName, OpenModule)])
-&gt; [ModuleReexport]
-&gt; (ModuleReexport -&gt; Either Doc (ModuleName, OpenModule))
-&gt; [Either Doc (ModuleName, OpenModule)]
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">(ModuleReexport -&gt; Either Doc (ModuleName, OpenModule))
-&gt; [ModuleReexport] -&gt; [Either Doc (ModuleName, OpenModule)]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[ModuleReexport]
</span><a href="#local-6989586621679723099"><span class="hs-identifier hs-var">src_reexports</span></a></span><span> </span><span class="annot"><span class="annottext">((ModuleReexport -&gt; Either Doc (ModuleName, OpenModule))
 -&gt; LogProgress [(ModuleName, OpenModule)])
-&gt; (ModuleReexport -&gt; Either Doc (ModuleName, OpenModule))
-&gt; LogProgress [(ModuleName, OpenModule)]
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="hs-glyph">\</span><span id="local-6989586621679722961"><span class="annot"><span class="annottext">reex :: ModuleReexport
</span><a href="#local-6989586621679722961"><span class="hs-identifier hs-var">reex</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ModuleReexport.html#ModuleReexport"><span class="hs-identifier hs-type">ModuleReexport</span></a></span><span> </span><span id="local-6989586621679722959"><span class="annot"><span class="annottext">Maybe PackageName
</span><a href="#local-6989586621679722959"><span class="hs-identifier hs-var">mb_pn</span></a></span></span><span> </span><span id="local-6989586621679722958"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722958"><span class="hs-identifier hs-var">from</span></a></span></span><span> </span><span id="local-6989586621679722957"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722957"><span class="hs-identifier hs-var">to</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-258"></span><span>      </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ModuleName -&gt; ModuleProvides -&gt; Maybe [ModuleWithSource]
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Maybe a
</span><a href="../../containers/src/Data.Map.Internal.html#lookup"><span class="hs-identifier hs-var">Map.lookup</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722958"><span class="hs-identifier hs-var">from</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleScope -&gt; ModuleProvides
</span><a href="Distribution.Backpack.ModuleScope.html#modScopeProvides"><span class="hs-identifier hs-var hs-var">modScopeProvides</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleScope
</span><a href="#local-6989586621679722974"><span class="hs-identifier hs-var">linked_shape</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-259"></span><span>        </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679722956"><span class="annot"><span class="annottext">cands :: [ModuleWithSource]
</span><a href="#local-6989586621679722956"><span class="hs-identifier hs-var">cands</span></a></span></span><span class="hs-glyph">@</span><span class="hs-special">(</span><span id="local-6989586621679722955"><span class="annot"><span class="annottext">ModuleWithSource
</span><a href="#local-6989586621679722955"><span class="hs-identifier hs-var">x0</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679722954"><span class="annot"><span class="annottext">[ModuleWithSource]
</span><a href="#local-6989586621679722954"><span class="hs-identifier hs-var">xs0</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-260"></span><span>          </span><span class="hs-comment">-- Make sure there is at least one candidate</span><span>
</span><span id="line-261"></span><span>          </span><span class="hs-special">(</span><span id="local-6989586621679722953"><span class="annot"><span class="annottext">ModuleWithSource
</span><a href="#local-6989586621679722953"><span class="hs-identifier hs-var">x</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679722952"><span class="annot"><span class="annottext">[ModuleWithSource]
</span><a href="#local-6989586621679722952"><span class="hs-identifier hs-var">xs</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span>
</span><span id="line-262"></span><span>            </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Maybe PackageName
</span><a href="#local-6989586621679722959"><span class="hs-identifier hs-var">mb_pn</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-263"></span><span>              </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679722951"><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679722951"><span class="hs-identifier hs-var">pn</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-264"></span><span>                </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679722950"><span class="annot"><span class="annottext">matches_pn :: ModuleSource -&gt; Bool
</span><a href="#local-6989586621679722950"><span class="hs-identifier hs-var hs-var">matches_pn</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Backpack.ModuleScope.html#FromMixins"><span class="hs-identifier hs-type">FromMixins</span></a></span><span> </span><span id="local-6989586621679722948"><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679722948"><span class="hs-identifier hs-var">pn'</span></a></span></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><span class="hs-identifier">_</span></span><span> </span><span class="annot"><span class="annottext">IncludeRenaming
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679722951"><span class="hs-identifier hs-var">pn</span></a></span><span> </span><span class="annot"><span class="annottext">PackageName -&gt; PackageName -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679722948"><span class="hs-identifier hs-var">pn'</span></a></span><span>
</span><span id="line-265"></span><span>                    </span><span class="annot"><a href="#local-6989586621679722950"><span class="hs-identifier hs-var">matches_pn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Backpack.ModuleScope.html#FromBuildDepends"><span class="hs-identifier hs-type">FromBuildDepends</span></a></span><span> </span><span id="local-6989586621679722946"><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679722946"><span class="hs-identifier hs-var">pn'</span></a></span></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679722951"><span class="hs-identifier hs-var">pn</span></a></span><span> </span><span class="annot"><span class="annottext">PackageName -&gt; PackageName -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679722946"><span class="hs-identifier hs-var">pn'</span></a></span><span>
</span><span id="line-266"></span><span>                    </span><span class="annot"><a href="#local-6989586621679722950"><span class="hs-identifier hs-var">matches_pn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Backpack.ModuleScope.html#FromExposedModules"><span class="hs-identifier hs-type">FromExposedModules</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679722951"><span class="hs-identifier hs-var">pn</span></a></span><span> </span><span class="annot"><span class="annottext">PackageName -&gt; PackageName -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">PackageId -&gt; PackageName
forall pkg. Package pkg =&gt; pkg -&gt; PackageName
</span><a href="Distribution.Package.html#packageName"><span class="hs-identifier hs-var">packageName</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679723116"><span class="hs-identifier hs-var">this_pid</span></a></span><span>
</span><span id="line-267"></span><span>                    </span><span class="annot"><a href="#local-6989586621679722950"><span class="hs-identifier hs-var">matches_pn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Backpack.ModuleScope.html#FromOtherModules"><span class="hs-identifier hs-type">FromOtherModules</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679722951"><span class="hs-identifier hs-var">pn</span></a></span><span> </span><span class="annot"><span class="annottext">PackageName -&gt; PackageName -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">PackageId -&gt; PackageName
forall pkg. Package pkg =&gt; pkg -&gt; PackageName
</span><a href="Distribution.Package.html#packageName"><span class="hs-identifier hs-var">packageName</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679723116"><span class="hs-identifier hs-var">this_pid</span></a></span><span>
</span><span id="line-268"></span><span>                    </span><span class="annot"><a href="#local-6989586621679722950"><span class="hs-identifier hs-var">matches_pn</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Backpack.ModuleScope.html#FromSignatures"><span class="hs-identifier hs-type">FromSignatures</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679722951"><span class="hs-identifier hs-var">pn</span></a></span><span> </span><span class="annot"><span class="annottext">PackageName -&gt; PackageName -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">PackageId -&gt; PackageName
forall pkg. Package pkg =&gt; pkg -&gt; PackageName
</span><a href="Distribution.Package.html#packageName"><span class="hs-identifier hs-var">packageName</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679723116"><span class="hs-identifier hs-var">this_pid</span></a></span><span>
</span><span id="line-269"></span><span>                </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(ModuleWithSource -&gt; Bool)
-&gt; [ModuleWithSource] -&gt; [ModuleWithSource]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleSource -&gt; Bool
</span><a href="#local-6989586621679722950"><span class="hs-identifier hs-var">matches_pn</span></a></span><span> </span><span class="annot"><span class="annottext">(ModuleSource -&gt; Bool)
-&gt; (ModuleWithSource -&gt; ModuleSource) -&gt; ModuleWithSource -&gt; Bool
forall b c a. (b -&gt; c) -&gt; (a -&gt; b) -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#."><span class="hs-operator hs-var">.</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleWithSource -&gt; ModuleSource
forall a. WithSource a -&gt; ModuleSource
</span><a href="Distribution.Backpack.ModuleScope.html#getSource"><span class="hs-identifier hs-var">getSource</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[ModuleWithSource]
</span><a href="#local-6989586621679722956"><span class="hs-identifier hs-var">cands</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-270"></span><span>                    </span><span class="hs-special">(</span><span id="local-6989586621679722943"><span class="annot"><span class="annottext">ModuleWithSource
</span><a href="#local-6989586621679722943"><span class="hs-identifier hs-var">x1</span></a></span></span><span class="annot"><span class="hs-glyph hs-type">:</span></span><span id="local-6989586621679722942"><span class="annot"><span class="annottext">[ModuleWithSource]
</span><a href="#local-6989586621679722942"><span class="hs-identifier hs-var">xs1</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(ModuleWithSource, [ModuleWithSource])
-&gt; Either Doc (ModuleWithSource, [ModuleWithSource])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleWithSource
</span><a href="#local-6989586621679722943"><span class="hs-identifier hs-var">x1</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[ModuleWithSource]
</span><a href="#local-6989586621679722942"><span class="hs-identifier hs-var">xs1</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-271"></span><span>                    </span><span class="annot"><span class="annottext">[ModuleWithSource]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Either Doc (ModuleWithSource, [ModuleWithSource])
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleReexport -&gt; Doc
</span><a href="Distribution.Backpack.LinkedComponent.html#brokenReexportMsg"><span class="hs-identifier hs-var">brokenReexportMsg</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleReexport
</span><a href="#local-6989586621679722961"><span class="hs-identifier hs-var">reex</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-272"></span><span>              </span><span class="annot"><span class="annottext">Maybe PackageName
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">(ModuleWithSource, [ModuleWithSource])
-&gt; Either Doc (ModuleWithSource, [ModuleWithSource])
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleWithSource
</span><a href="#local-6989586621679722955"><span class="hs-identifier hs-var">x0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[ModuleWithSource]
</span><a href="#local-6989586621679722954"><span class="hs-identifier hs-var">xs0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-273"></span><span>          </span><span class="hs-comment">-- Test that all the candidates are consistent</span><span>
</span><span id="line-274"></span><span>          </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">(ModuleWithSource -&gt; Bool)
-&gt; [ModuleWithSource] -&gt; [ModuleWithSource]
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#filter"><span class="hs-identifier hs-var">filter</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679722940"><span class="annot"><span class="annottext">ModuleWithSource
</span><a href="#local-6989586621679722940"><span class="hs-identifier hs-var">x'</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ModuleWithSource -&gt; OpenModule
forall a. WithSource a -&gt; a
</span><a href="Distribution.Backpack.ModuleScope.html#unWithSource"><span class="hs-identifier hs-var">unWithSource</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleWithSource
</span><a href="#local-6989586621679722953"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">OpenModule -&gt; OpenModule -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">/=</span></span><span> </span><span class="annot"><span class="annottext">ModuleWithSource -&gt; OpenModule
forall a. WithSource a -&gt; a
</span><a href="Distribution.Backpack.ModuleScope.html#unWithSource"><span class="hs-identifier hs-var">unWithSource</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleWithSource
</span><a href="#local-6989586621679722940"><span class="hs-identifier hs-var">x'</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[ModuleWithSource]
</span><a href="#local-6989586621679722952"><span class="hs-identifier hs-var">xs</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-275"></span><span>            </span><span class="hs-special">[</span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">() -&gt; Either Doc ()
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-276"></span><span>            </span><span class="annot"><span class="annottext">[ModuleWithSource]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Either Doc ()
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; Either Doc ()) -&gt; Doc -&gt; Either Doc ()
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleReexport -&gt; ModuleWithSource -&gt; [ModuleWithSource] -&gt; Doc
</span><a href="Distribution.Backpack.LinkedComponent.html#ambiguousReexportMsg"><span class="hs-identifier hs-var">ambiguousReexportMsg</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleReexport
</span><a href="#local-6989586621679722961"><span class="hs-identifier hs-var">reex</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleWithSource
</span><a href="#local-6989586621679722953"><span class="hs-identifier hs-var">x</span></a></span><span> </span><span class="annot"><span class="annottext">[ModuleWithSource]
</span><a href="#local-6989586621679722952"><span class="hs-identifier hs-var">xs</span></a></span><span>
</span><span id="line-277"></span><span>          </span><span class="annot"><span class="annottext">(ModuleName, OpenModule) -&gt; Either Doc (ModuleName, OpenModule)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722957"><span class="hs-identifier hs-var">to</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">ModuleWithSource -&gt; OpenModule
forall a. WithSource a -&gt; a
</span><a href="Distribution.Backpack.ModuleScope.html#unWithSource"><span class="hs-identifier hs-var">unWithSource</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleWithSource
</span><a href="#local-6989586621679722953"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-278"></span><span>        </span><span class="annot"><span class="annottext">Maybe [ModuleWithSource]
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span>
</span><span id="line-279"></span><span>          </span><span class="annot"><span class="annottext">Doc -&gt; Either Doc (ModuleName, OpenModule)
forall a b. a -&gt; Either a b
</span><a href="../../base/src/Data.Either.html#Left"><span class="hs-identifier hs-var">Left</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleReexport -&gt; Doc
</span><a href="Distribution.Backpack.LinkedComponent.html#brokenReexportMsg"><span class="hs-identifier hs-var">brokenReexportMsg</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleReexport
</span><a href="#local-6989586621679722961"><span class="hs-identifier hs-var">reex</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-280"></span><span>
</span><span id="line-281"></span><span>    </span><span class="hs-comment">-- TODO: maybe check this earlier; it's syntactically obvious.</span><span>
</span><span id="line-282"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679722930"><span class="annot"><span class="annottext">build_reexports :: Map k a -&gt; (k, a) -&gt; LogProgress (Map k a)
</span><a href="#local-6989586621679722930"><span class="hs-identifier hs-var hs-var">build_reexports</span></a></span></span><span> </span><span id="local-6989586621679722929"><span class="annot"><span class="annottext">Map k a
</span><a href="#local-6989586621679722929"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679722928"><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621679722928"><span class="hs-identifier hs-var">k</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679722927"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679722927"><span class="hs-identifier hs-var">v</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-283"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">k -&gt; Map k a -&gt; Bool
forall k a. Ord k =&gt; k -&gt; Map k a -&gt; Bool
</span><a href="../../containers/src/Data.Map.Internal.html#member"><span class="hs-identifier hs-var">Map.member</span></a></span><span> </span><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621679722928"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">Map k a
</span><a href="#local-6989586621679722929"><span class="hs-identifier hs-var">m</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-284"></span><span>                </span><span class="annot"><span class="annottext">Doc -&gt; LogProgress (Map k a)
forall a. Doc -&gt; LogProgress a
</span><a href="Distribution.Utils.LogProgress.html#dieProgress"><span class="hs-identifier hs-var">dieProgress</span></a></span><span> </span><span class="annot"><span class="annottext">(Doc -&gt; LogProgress (Map k a)) -&gt; Doc -&gt; LogProgress (Map k a)
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#hsep"><span class="hs-identifier hs-var">hsep</span></a></span><span>
</span><span id="line-285"></span><span>                    </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Module name &quot;</span></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">k -&gt; Doc
forall a. Pretty a =&gt; a -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var">pretty</span></a></span><span> </span><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621679722928"><span class="hs-identifier hs-var">k</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot; is exported multiple times.&quot;</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-286"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Map k a -&gt; LogProgress (Map k a)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">k -&gt; a -&gt; Map k a -&gt; Map k a
forall k a. Ord k =&gt; k -&gt; a -&gt; Map k a -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#insert"><span class="hs-identifier hs-var">Map.insert</span></a></span><span> </span><span class="annot"><span class="annottext">k
</span><a href="#local-6989586621679722928"><span class="hs-identifier hs-var">k</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679722927"><span class="hs-identifier hs-var">v</span></a></span><span> </span><span class="annot"><span class="annottext">Map k a
</span><a href="#local-6989586621679722929"><span class="hs-identifier hs-var">m</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-287"></span><span>    </span><span id="local-6989586621679722924"><span class="annot"><span class="annottext">OpenModuleSubst
</span><a href="#local-6989586621679722924"><span class="hs-identifier hs-var">provs</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">(OpenModuleSubst
 -&gt; (ModuleName, OpenModule) -&gt; LogProgress OpenModuleSubst)
-&gt; OpenModuleSubst
-&gt; [(ModuleName, OpenModule)]
-&gt; LogProgress OpenModuleSubst
forall (t :: * -&gt; *) (m :: * -&gt; *) b a.
(Foldable t, Monad m) =&gt;
(b -&gt; a -&gt; m b) -&gt; b -&gt; t a -&gt; m b
</span><a href="../../base/src/Control.Monad.html#foldM"><span class="hs-identifier hs-var">foldM</span></a></span><span> </span><span class="annot"><span class="annottext">OpenModuleSubst
-&gt; (ModuleName, OpenModule) -&gt; LogProgress OpenModuleSubst
forall {k} {a}.
(Ord k, Pretty k) =&gt;
Map k a -&gt; (k, a) -&gt; LogProgress (Map k a)
</span><a href="#local-6989586621679722930"><span class="hs-identifier hs-var">build_reexports</span></a></span><span> </span><span class="annot"><span class="annottext">OpenModuleSubst
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">Map.empty</span></a></span><span> </span><span class="annot"><span class="annottext">([(ModuleName, OpenModule)] -&gt; LogProgress OpenModuleSubst)
-&gt; [(ModuleName, OpenModule)] -&gt; LogProgress OpenModuleSubst
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-288"></span><span>                </span><span class="hs-comment">-- TODO: doublecheck we have checked for</span><span>
</span><span id="line-289"></span><span>                </span><span class="hs-comment">-- src_provs duplicates already!</span><span>
</span><span id="line-290"></span><span>                </span><span class="hs-special">[</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722922"><span class="hs-identifier hs-var">mod_name</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">OpenUnitId -&gt; ModuleName -&gt; OpenModule
</span><a href="Distribution.Backpack.html#OpenModule"><span class="hs-identifier hs-var">OpenModule</span></a></span><span> </span><span class="annot"><span class="annottext">OpenUnitId
</span><a href="#local-6989586621679723059"><span class="hs-identifier hs-var">this_uid</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722922"><span class="hs-identifier hs-var">mod_name</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679722922"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722922"><span class="hs-identifier hs-var">mod_name</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ModuleName]
</span><a href="#local-6989586621679723100"><span class="hs-identifier hs-var">src_provs</span></a></span><span> </span><span class="hs-special">]</span><span> </span><span class="annot"><span class="annottext">[(ModuleName, OpenModule)]
-&gt; [(ModuleName, OpenModule)] -&gt; [(ModuleName, OpenModule)]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span>
</span><span id="line-291"></span><span>                </span><span class="annot"><span class="annottext">[(ModuleName, OpenModule)]
</span><a href="#local-6989586621679722963"><span class="hs-identifier hs-var">reexports_list</span></a></span><span>
</span><span id="line-292"></span><span>
</span><span id="line-293"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679722921"><span class="annot"><span class="annottext">final_linked_shape :: ModuleShape
</span><a href="#local-6989586621679722921"><span class="hs-identifier hs-var hs-var">final_linked_shape</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">OpenModuleSubst -&gt; Set ModuleName -&gt; ModuleShape
</span><a href="Distribution.Backpack.ModuleShape.html#ModuleShape"><span class="hs-identifier hs-var">ModuleShape</span></a></span><span> </span><span class="annot"><span class="annottext">OpenModuleSubst
</span><a href="#local-6989586621679722924"><span class="hs-identifier hs-var">provs</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleProvides -&gt; Set ModuleName
forall k a. Map k a -&gt; Set k
</span><a href="../../containers/src/Data.Map.Internal.html#keysSet"><span class="hs-identifier hs-var">Map.keysSet</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleScope -&gt; ModuleProvides
</span><a href="Distribution.Backpack.ModuleScope.html#modScopeRequires"><span class="hs-identifier hs-var hs-var">modScopeRequires</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleScope
</span><a href="#local-6989586621679722974"><span class="hs-identifier hs-var">linked_shape</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-294"></span><span>
</span><span id="line-295"></span><span>    </span><span class="hs-comment">-- See Note Note [Signature package special case]</span><span>
</span><span id="line-296"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679722917"><span class="annot"><span class="annottext">[ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="#local-6989586621679722917"><span class="hs-identifier hs-var">linked_includes</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679722916"><span class="annot"><span class="annottext">[ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="#local-6989586621679722916"><span class="hs-identifier hs-var">linked_sig_includes</span></a></span></span><span class="hs-special">)</span><span>
</span><span id="line-297"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Set ModuleName -&gt; Bool
forall a. Set a -&gt; Bool
</span><a href="../../containers/src/Data.Set.Internal.html#null"><span class="hs-identifier hs-var">Set.null</span></a></span><span> </span><span class="annot"><span class="annottext">Set ModuleName
</span><a href="#local-6989586621679723062"><span class="hs-identifier hs-var">reqs</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="#local-6989586621679723057"><span class="hs-identifier hs-var">linked_includes0</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInclude OpenUnitId ModuleRenaming]
-&gt; [ComponentInclude OpenUnitId ModuleRenaming]
-&gt; [ComponentInclude OpenUnitId ModuleRenaming]
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="#local-6989586621679723056"><span class="hs-identifier hs-var">linked_sig_includes0</span></a></span><span class="hs-special">,</span><span> </span><span class="hs-special">[</span><span class="hs-special">]</span><span class="hs-special">)</span><span>
</span><span id="line-298"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="#local-6989586621679723057"><span class="hs-identifier hs-var">linked_includes0</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">[ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="#local-6989586621679723056"><span class="hs-identifier hs-var">linked_sig_includes0</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-299"></span><span>
</span><span id="line-300"></span><span>    </span><span class="annot"><span class="annottext">LinkedComponent -&gt; LogProgress LinkedComponent
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="annot"><span class="annottext">(LinkedComponent -&gt; LogProgress LinkedComponent)
-&gt; LinkedComponent -&gt; LogProgress LinkedComponent
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponent :: AnnotatedId ComponentId
-&gt; Component
-&gt; [AnnotatedId OpenUnitId]
-&gt; Bool
-&gt; [ComponentInclude OpenUnitId ModuleRenaming]
-&gt; [ComponentInclude OpenUnitId ModuleRenaming]
-&gt; ModuleShape
-&gt; LinkedComponent
</span><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponent"><span class="hs-identifier hs-type">LinkedComponent</span></a></span><span> </span><span class="hs-special">{</span><span>
</span><span id="line-301"></span><span>                </span><span class="annot"><span class="annottext">lc_ann_id :: AnnotatedId ComponentId
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_ann_id"><span class="hs-identifier hs-var">lc_ann_id</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">AnnotatedId ComponentId
</span><a href="#local-6989586621679723112"><span class="hs-identifier hs-var">aid</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-302"></span><span>                </span><span class="annot"><span class="annottext">lc_component :: Component
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_component"><span class="hs-identifier hs-var">lc_component</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Component
</span><a href="#local-6989586621679723108"><span class="hs-identifier hs-var">component</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-303"></span><span>                </span><span class="annot"><span class="annottext">lc_public :: Bool
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_public"><span class="hs-identifier hs-var">lc_public</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679723104"><span class="hs-identifier hs-var">is_public</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-304"></span><span>                </span><span class="hs-comment">-- These must be executables</span><span>
</span><span id="line-305"></span><span>                </span><span class="annot"><span class="annottext">lc_exe_deps :: [AnnotatedId OpenUnitId]
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_exe_deps"><span class="hs-identifier hs-var">lc_exe_deps</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(AnnotatedId ComponentId -&gt; AnnotatedId OpenUnitId)
-&gt; [AnnotatedId ComponentId] -&gt; [AnnotatedId OpenUnitId]
forall a b. (a -&gt; b) -&gt; [a] -&gt; [b]
</span><a href="../../base/src/GHC.Base.html#map"><span class="hs-identifier hs-var">map</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(ComponentId -&gt; OpenUnitId)
-&gt; AnnotatedId ComponentId -&gt; AnnotatedId OpenUnitId
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-glyph">\</span><span id="local-6989586621679722915"><span class="annot"><span class="annottext">ComponentId
</span><a href="#local-6989586621679722915"><span class="hs-identifier hs-var">cid</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ComponentId -&gt; OpenModuleSubst -&gt; OpenUnitId
</span><a href="Distribution.Backpack.html#IndefFullUnitId"><span class="hs-identifier hs-var">IndefFullUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentId
</span><a href="#local-6989586621679722915"><span class="hs-identifier hs-var">cid</span></a></span><span> </span><span class="annot"><span class="annottext">OpenModuleSubst
forall k a. Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#empty"><span class="hs-identifier hs-var">Map.empty</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">[AnnotatedId ComponentId]
</span><a href="#local-6989586621679723106"><span class="hs-identifier hs-var">exe_deps</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-306"></span><span>                </span><span class="annot"><span class="annottext">lc_shape :: ModuleShape
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_shape"><span class="hs-identifier hs-var">lc_shape</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">ModuleShape
</span><a href="#local-6989586621679722921"><span class="hs-identifier hs-var">final_linked_shape</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-307"></span><span>                </span><span class="annot"><span class="annottext">lc_includes :: [ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_includes"><span class="hs-identifier hs-var">lc_includes</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="#local-6989586621679722917"><span class="hs-identifier hs-var">linked_includes</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-308"></span><span>                </span><span class="annot"><span class="annottext">lc_sig_includes :: [ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_sig_includes"><span class="hs-identifier hs-var">lc_sig_includes</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[ComponentInclude OpenUnitId ModuleRenaming]
</span><a href="#local-6989586621679722916"><span class="hs-identifier hs-var">linked_sig_includes</span></a></span><span>
</span><span id="line-309"></span><span>           </span><span class="hs-special">}</span><span>
</span><span id="line-310"></span><span>
</span><span id="line-311"></span><span class="hs-comment">-- Note [Signature package special case]</span><span>
</span><span id="line-312"></span><span class="hs-comment">-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</span><span>
</span><span id="line-313"></span><span class="hs-comment">-- Suppose we have p-indef, which depends on str-sig and inherits</span><span>
</span><span id="line-314"></span><span class="hs-comment">-- the hole from that signature package.  When we instantiate p-indef,</span><span>
</span><span id="line-315"></span><span class="hs-comment">-- it's a bit pointless to also go ahead and build str-sig, because</span><span>
</span><span id="line-316"></span><span class="hs-comment">-- str-sig cannot possibly have contributed any code to the package</span><span>
</span><span id="line-317"></span><span class="hs-comment">-- in question.  Furthermore, because the signature was inherited to</span><span>
</span><span id="line-318"></span><span class="hs-comment">-- p-indef, if we test matching against p-indef, we also have tested</span><span>
</span><span id="line-319"></span><span class="hs-comment">-- matching against p-sig.  In fact, skipping p-sig is *mandatory*,</span><span>
</span><span id="line-320"></span><span class="hs-comment">-- because p-indef may have thinned it (so that an implementation may</span><span>
</span><span id="line-321"></span><span class="hs-comment">-- match p-indef but not p-sig.)</span><span>
</span><span id="line-322"></span><span class="hs-comment">--</span><span>
</span><span id="line-323"></span><span class="hs-comment">-- However, suppose that we have a package which mixes together str-sig</span><span>
</span><span id="line-324"></span><span class="hs-comment">-- and str-bytestring, with the intent of *checking* that str-sig is</span><span>
</span><span id="line-325"></span><span class="hs-comment">-- implemented by str-bytestring.  Here, it's quite important to</span><span>
</span><span id="line-326"></span><span class="hs-comment">-- build an instantiated str-sig, since that is the only way we will</span><span>
</span><span id="line-327"></span><span class="hs-comment">-- actually end up testing if the matching works.  Note that this</span><span>
</span><span id="line-328"></span><span class="hs-comment">-- admonition only applies if the package has NO requirements; if it</span><span>
</span><span id="line-329"></span><span class="hs-comment">-- has any requirements, we will typecheck it as an indefinite</span><span>
</span><span id="line-330"></span><span class="hs-comment">-- package, at which point the signature includes will be passed to</span><span>
</span><span id="line-331"></span><span class="hs-comment">-- GHC who will in turn actually do the checking to make sure they</span><span>
</span><span id="line-332"></span><span class="hs-comment">-- are instantiated correctly.</span><span>
</span><span id="line-333"></span><span>
</span><span id="line-334"></span><span class="hs-comment">-- Handle mix-in linking for components.  In the absence of Backpack,</span><span>
</span><span id="line-335"></span><span class="hs-comment">-- every ComponentId gets converted into a UnitId by way of SimpleUnitId.</span><span>
</span><span id="line-336"></span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#toLinkedComponents"><span class="hs-identifier hs-type">toLinkedComponents</span></a></span><span>
</span><span id="line-337"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Verbosity.html#Verbosity"><span class="hs-identifier hs-type">Verbosity</span></a></span><span>
</span><span id="line-338"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Backpack.FullUnitId.html#FullDb"><span class="hs-identifier hs-type">FullDb</span></a></span><span>
</span><span id="line-339"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageId"><span class="hs-identifier hs-type">PackageId</span></a></span><span>
</span><span id="line-340"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponentMap"><span class="hs-identifier hs-type">LinkedComponentMap</span></a></span><span>
</span><span id="line-341"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Backpack.ConfiguredComponent.html#ConfiguredComponent"><span class="hs-identifier hs-type">ConfiguredComponent</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-342"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Utils.LogProgress.html#LogProgress"><span class="hs-identifier hs-type">LogProgress</span></a></span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponent"><span class="hs-identifier hs-type">LinkedComponent</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-343"></span><span id="toLinkedComponents"><span class="annot"><span class="annottext">toLinkedComponents :: Verbosity
-&gt; FullDb
-&gt; PackageId
-&gt; LinkedComponentMap
-&gt; [ConfiguredComponent]
-&gt; LogProgress [LinkedComponent]
</span><a href="Distribution.Backpack.LinkedComponent.html#toLinkedComponents"><span class="hs-identifier hs-var hs-var">toLinkedComponents</span></a></span></span><span> </span><span id="local-6989586621679722914"><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679722914"><span class="hs-identifier hs-var">verbosity</span></a></span></span><span> </span><span id="local-6989586621679722913"><span class="annot"><span class="annottext">FullDb
</span><a href="#local-6989586621679722913"><span class="hs-identifier hs-var">db</span></a></span></span><span> </span><span id="local-6989586621679722912"><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679722912"><span class="hs-identifier hs-var">this_pid</span></a></span></span><span> </span><span id="local-6989586621679722911"><span class="annot"><span class="annottext">LinkedComponentMap
</span><a href="#local-6989586621679722911"><span class="hs-identifier hs-var">lc_map0</span></a></span></span><span> </span><span id="local-6989586621679722910"><span class="annot"><span class="annottext">[ConfiguredComponent]
</span><a href="#local-6989586621679722910"><span class="hs-identifier hs-var">comps</span></a></span></span><span>
</span><span id="line-344"></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">((LinkedComponentMap, [LinkedComponent]) -&gt; [LinkedComponent])
-&gt; LogProgress (LinkedComponentMap, [LinkedComponent])
-&gt; LogProgress [LinkedComponent]
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">(LinkedComponentMap, [LinkedComponent]) -&gt; [LinkedComponent]
forall a b. (a, b) -&gt; b
</span><a href="../../base/src/Data.Tuple.html#snd"><span class="hs-identifier hs-var">snd</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(LinkedComponentMap
 -&gt; ConfiguredComponent
 -&gt; LogProgress (LinkedComponentMap, LinkedComponent))
-&gt; LinkedComponentMap
-&gt; [ConfiguredComponent]
-&gt; LogProgress (LinkedComponentMap, [LinkedComponent])
forall (m :: * -&gt; *) (t :: * -&gt; *) a b c.
(Monad m, Traversable t) =&gt;
(a -&gt; b -&gt; m (a, c)) -&gt; a -&gt; t b -&gt; m (a, t c)
</span><a href="Distribution.Utils.MapAccum.html#mapAccumM"><span class="hs-identifier hs-var">mapAccumM</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponentMap
-&gt; ConfiguredComponent
-&gt; LogProgress (LinkedComponentMap, LinkedComponent)
</span><a href="#local-6989586621679722908"><span class="hs-identifier hs-var">go</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponentMap
</span><a href="#local-6989586621679722911"><span class="hs-identifier hs-var">lc_map0</span></a></span><span> </span><span class="annot"><span class="annottext">[ConfiguredComponent]
</span><a href="#local-6989586621679722910"><span class="hs-identifier hs-var">comps</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-345"></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-346"></span><span>  </span><span class="annot"><a href="#local-6989586621679722908"><span class="hs-identifier hs-type">go</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.ComponentId.html#ComponentId"><span class="hs-identifier hs-type">ComponentId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Backpack.html#OpenUnitId"><span class="hs-identifier hs-type">OpenUnitId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Backpack.ModuleShape.html#ModuleShape"><span class="hs-identifier hs-type">ModuleShape</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-347"></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Backpack.ConfiguredComponent.html#ConfiguredComponent"><span class="hs-identifier hs-type">ConfiguredComponent</span></a></span><span>
</span><span id="line-348"></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Utils.LogProgress.html#LogProgress"><span class="hs-identifier hs-type">LogProgress</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.ComponentId.html#ComponentId"><span class="hs-identifier hs-type">ComponentId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Backpack.html#OpenUnitId"><span class="hs-identifier hs-type">OpenUnitId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Backpack.ModuleShape.html#ModuleShape"><span class="hs-identifier hs-type">ModuleShape</span></a></span><span class="hs-special">)</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponent"><span class="hs-identifier hs-type">LinkedComponent</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-349"></span><span>  </span><span id="local-6989586621679722908"><span class="annot"><span class="annottext">go :: LinkedComponentMap
-&gt; ConfiguredComponent
-&gt; LogProgress (LinkedComponentMap, LinkedComponent)
</span><a href="#local-6989586621679722908"><span class="hs-identifier hs-var hs-var">go</span></a></span></span><span> </span><span id="local-6989586621679722907"><span class="annot"><span class="annottext">LinkedComponentMap
</span><a href="#local-6989586621679722907"><span class="hs-identifier hs-var">lc_map</span></a></span></span><span> </span><span id="local-6989586621679722906"><span class="annot"><span class="annottext">ConfiguredComponent
</span><a href="#local-6989586621679722906"><span class="hs-identifier hs-var">cc</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">do</span><span>
</span><span id="line-350"></span><span>    </span><span id="local-6989586621679722905"><span class="annot"><span class="annottext">LinkedComponent
</span><a href="#local-6989586621679722905"><span class="hs-identifier hs-var">lc</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; LogProgress LinkedComponent -&gt; LogProgress LinkedComponent
forall a. Doc -&gt; LogProgress a -&gt; LogProgress a
</span><a href="Distribution.Utils.LogProgress.html#addProgressCtx"><span class="hs-identifier hs-var">addProgressCtx</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;In the stanza&quot;</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ComponentName -&gt; String
</span><a href="Distribution.Types.ComponentName.html#componentNameStanza"><span class="hs-identifier hs-var">componentNameStanza</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ConfiguredComponent -&gt; ComponentName
</span><a href="Distribution.Backpack.ConfiguredComponent.html#cc_name"><span class="hs-identifier hs-var">cc_name</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredComponent
</span><a href="#local-6989586621679722906"><span class="hs-identifier hs-var">cc</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">(LogProgress LinkedComponent -&gt; LogProgress LinkedComponent)
-&gt; LogProgress LinkedComponent -&gt; LogProgress LinkedComponent
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span>
</span><span id="line-351"></span><span>            </span><span class="annot"><span class="annottext">Verbosity
-&gt; FullDb
-&gt; PackageId
-&gt; LinkedComponentMap
-&gt; ConfiguredComponent
-&gt; LogProgress LinkedComponent
</span><a href="Distribution.Backpack.LinkedComponent.html#toLinkedComponent"><span class="hs-identifier hs-var">toLinkedComponent</span></a></span><span> </span><span class="annot"><span class="annottext">Verbosity
</span><a href="#local-6989586621679722914"><span class="hs-identifier hs-var">verbosity</span></a></span><span> </span><span class="annot"><span class="annottext">FullDb
</span><a href="#local-6989586621679722913"><span class="hs-identifier hs-var">db</span></a></span><span> </span><span class="annot"><span class="annottext">PackageId
</span><a href="#local-6989586621679722912"><span class="hs-identifier hs-var">this_pid</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponentMap
</span><a href="#local-6989586621679722907"><span class="hs-identifier hs-var">lc_map</span></a></span><span> </span><span class="annot"><span class="annottext">ConfiguredComponent
</span><a href="#local-6989586621679722906"><span class="hs-identifier hs-var">cc</span></a></span><span>
</span><span id="line-352"></span><span>    </span><span class="annot"><span class="annottext">(LinkedComponentMap, LinkedComponent)
-&gt; LogProgress (LinkedComponentMap, LinkedComponent)
forall (m :: * -&gt; *) a. Monad m =&gt; a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var">return</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LinkedComponent -&gt; LinkedComponentMap -&gt; LinkedComponentMap
</span><a href="Distribution.Backpack.LinkedComponent.html#extendLinkedComponentMap"><span class="hs-identifier hs-var">extendLinkedComponentMap</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponent
</span><a href="#local-6989586621679722905"><span class="hs-identifier hs-var">lc</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponentMap
</span><a href="#local-6989586621679722907"><span class="hs-identifier hs-var">lc_map</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LinkedComponent
</span><a href="#local-6989586621679722905"><span class="hs-identifier hs-var">lc</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-353"></span><span>
</span><span id="line-354"></span><span class="hs-keyword">type</span><span> </span><span id="LinkedComponentMap"><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponentMap"><span class="hs-identifier hs-var">LinkedComponentMap</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><a href="../../containers/src/Data.Map.Internal.html#Map"><span class="hs-identifier hs-type">Map</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.ComponentId.html#ComponentId"><span class="hs-identifier hs-type">ComponentId</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Backpack.html#OpenUnitId"><span class="hs-identifier hs-type">OpenUnitId</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Backpack.ModuleShape.html#ModuleShape"><span class="hs-identifier hs-type">ModuleShape</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-355"></span><span>
</span><span id="line-356"></span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#extendLinkedComponentMap"><span class="hs-identifier hs-type">extendLinkedComponentMap</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponent"><span class="hs-identifier hs-type">LinkedComponent</span></a></span><span>
</span><span id="line-357"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponentMap"><span class="hs-identifier hs-type">LinkedComponentMap</span></a></span><span>
</span><span id="line-358"></span><span>                         </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#LinkedComponentMap"><span class="hs-identifier hs-type">LinkedComponentMap</span></a></span><span>
</span><span id="line-359"></span><span id="extendLinkedComponentMap"><span class="annot"><span class="annottext">extendLinkedComponentMap :: LinkedComponent -&gt; LinkedComponentMap -&gt; LinkedComponentMap
</span><a href="Distribution.Backpack.LinkedComponent.html#extendLinkedComponentMap"><span class="hs-identifier hs-var hs-var">extendLinkedComponentMap</span></a></span></span><span> </span><span id="local-6989586621679722901"><span class="annot"><span class="annottext">LinkedComponent
</span><a href="#local-6989586621679722901"><span class="hs-identifier hs-var">lc</span></a></span></span><span> </span><span id="local-6989586621679722900"><span class="annot"><span class="annottext">LinkedComponentMap
</span><a href="#local-6989586621679722900"><span class="hs-identifier hs-var">m</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-360"></span><span>    </span><span class="annot"><span class="annottext">ComponentId
-&gt; (OpenUnitId, ModuleShape)
-&gt; LinkedComponentMap
-&gt; LinkedComponentMap
forall k a. Ord k =&gt; k -&gt; a -&gt; Map k a -&gt; Map k a
</span><a href="../../containers/src/Data.Map.Internal.html#insert"><span class="hs-identifier hs-var">Map.insert</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LinkedComponent -&gt; ComponentId
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_cid"><span class="hs-identifier hs-var">lc_cid</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponent
</span><a href="#local-6989586621679722901"><span class="hs-identifier hs-var">lc</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">LinkedComponent -&gt; OpenUnitId
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_uid"><span class="hs-identifier hs-var">lc_uid</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponent
</span><a href="#local-6989586621679722901"><span class="hs-identifier hs-var">lc</span></a></span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">LinkedComponent -&gt; ModuleShape
</span><a href="Distribution.Backpack.LinkedComponent.html#lc_shape"><span class="hs-identifier hs-var hs-var">lc_shape</span></a></span><span> </span><span class="annot"><span class="annottext">LinkedComponent
</span><a href="#local-6989586621679722901"><span class="hs-identifier hs-var">lc</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">LinkedComponentMap
</span><a href="#local-6989586621679722900"><span class="hs-identifier hs-var">m</span></a></span><span>
</span><span id="line-361"></span><span>
</span><span id="line-362"></span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#brokenReexportMsg"><span class="hs-identifier hs-type">brokenReexportMsg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.ModuleReexport.html#ModuleReexport"><span class="hs-identifier hs-type">ModuleReexport</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-363"></span><span id="brokenReexportMsg"><span class="annot"><span class="annottext">brokenReexportMsg :: ModuleReexport -&gt; Doc
</span><a href="Distribution.Backpack.LinkedComponent.html#brokenReexportMsg"><span class="hs-identifier hs-var hs-var">brokenReexportMsg</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ModuleReexport.html#ModuleReexport"><span class="hs-identifier hs-type">ModuleReexport</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679722899"><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679722899"><span class="hs-identifier hs-var">pn</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679722898"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722898"><span class="hs-identifier hs-var">from</span></a></span></span><span> </span><span id="local-6989586621679722897"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722897"><span class="hs-identifier hs-var">_to</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-364"></span><span>  </span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;The package&quot;</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PackageName -&gt; Doc
forall a. Pretty a =&gt; a -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var">pretty</span></a></span><span> </span><span class="annot"><span class="annottext">PackageName
</span><a href="#local-6989586621679722899"><span class="hs-identifier hs-var">pn</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-365"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;does not export a module&quot;</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; Doc
forall a. Pretty a =&gt; a -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var">pretty</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722898"><span class="hs-identifier hs-var">from</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-366"></span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#brokenReexportMsg"><span class="hs-identifier hs-var">brokenReexportMsg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ModuleReexport.html#ModuleReexport"><span class="hs-identifier hs-type">ModuleReexport</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe PackageName
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span id="local-6989586621679722896"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722896"><span class="hs-identifier hs-var">from</span></a></span></span><span> </span><span id="local-6989586621679722895"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722895"><span class="hs-identifier hs-var">_to</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-367"></span><span>  </span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;The module&quot;</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; Doc
forall a. Pretty a =&gt; a -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var">pretty</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722896"><span class="hs-identifier hs-var">from</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-368"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;is not exported by any suitable package.&quot;</span></span><span>
</span><span id="line-369"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;It occurs in neither the 'exposed-modules' of this package,&quot;</span></span><span>
</span><span id="line-370"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;nor any of its 'build-depends' dependencies.&quot;</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-371"></span><span>
</span><span id="line-372"></span><span class="annot"><a href="Distribution.Backpack.LinkedComponent.html#ambiguousReexportMsg"><span class="hs-identifier hs-type">ambiguousReexportMsg</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Types.ModuleReexport.html#ModuleReexport"><span class="hs-identifier hs-type">ModuleReexport</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Backpack.ModuleScope.html#ModuleWithSource"><span class="hs-identifier hs-type">ModuleWithSource</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Backpack.ModuleScope.html#ModuleWithSource"><span class="hs-identifier hs-type">ModuleWithSource</span></a></span><span class="hs-special">]</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#Doc"><span class="hs-identifier hs-type">Doc</span></a></span><span>
</span><span id="line-373"></span><span id="ambiguousReexportMsg"><span class="annot"><span class="annottext">ambiguousReexportMsg :: ModuleReexport -&gt; ModuleWithSource -&gt; [ModuleWithSource] -&gt; Doc
</span><a href="Distribution.Backpack.LinkedComponent.html#ambiguousReexportMsg"><span class="hs-identifier hs-var hs-var">ambiguousReexportMsg</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Types.ModuleReexport.html#ModuleReexport"><span class="hs-identifier hs-type">ModuleReexport</span></a></span><span> </span><span id="local-6989586621679722894"><span class="annot"><span class="annottext">Maybe PackageName
</span><a href="#local-6989586621679722894"><span class="hs-identifier hs-var">mb_pn</span></a></span></span><span> </span><span id="local-6989586621679722893"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722893"><span class="hs-identifier hs-var">from</span></a></span></span><span> </span><span id="local-6989586621679722892"><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722892"><span class="hs-identifier hs-var">_to</span></a></span></span><span class="hs-special">)</span><span> </span><span id="local-6989586621679722891"><span class="annot"><span class="annottext">ModuleWithSource
</span><a href="#local-6989586621679722891"><span class="hs-identifier hs-var">y1</span></a></span></span><span> </span><span id="local-6989586621679722890"><span class="annot"><span class="annottext">[ModuleWithSource]
</span><a href="#local-6989586621679722890"><span class="hs-identifier hs-var">ys</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-374"></span><span>  </span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;Ambiguous reexport&quot;</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">ModuleName -&gt; Doc
forall a. Pretty a =&gt; a -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var">pretty</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleName
</span><a href="#local-6989586621679722893"><span class="hs-identifier hs-var">from</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-375"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Int -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#hang"><span class="hs-identifier hs-var">hang</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;It could refer to either:&quot;</span></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">2</span></span><span>
</span><span id="line-376"></span><span>            </span><span class="hs-special">(</span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Doc
</span><a href="#local-6989586621679722889"><span class="hs-identifier hs-var">msg</span></a></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; [Doc] -&gt; [Doc]
forall a. a -&gt; [a] -&gt; [a]
</span><span class="hs-glyph hs-var">:</span></span><span> </span><span class="annot"><span class="annottext">[Doc]
</span><a href="#local-6989586621679722888"><span class="hs-identifier hs-var">msgs</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-377"></span><span>       </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">Maybe PackageName -&gt; Doc
forall {a}. Maybe a -&gt; Doc
</span><a href="#local-6989586621679722887"><span class="hs-identifier hs-var">help_msg</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe PackageName
</span><a href="#local-6989586621679722894"><span class="hs-identifier hs-var">mb_pn</span></a></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-378"></span><span>  </span><span class="hs-keyword">where</span><span>
</span><span id="line-379"></span><span>    </span><span id="local-6989586621679722889"><span class="annot"><span class="annottext">msg :: Doc
</span><a href="#local-6989586621679722889"><span class="hs-identifier hs-var hs-var">msg</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;  &quot;</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleWithSource -&gt; Doc
forall {a}. Pretty a =&gt; WithSource a -&gt; Doc
</span><a href="#local-6989586621679722886"><span class="hs-identifier hs-var">displayModuleWithSource</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleWithSource
</span><a href="#local-6989586621679722891"><span class="hs-identifier hs-var">y1</span></a></span><span>
</span><span id="line-380"></span><span>    </span><span id="local-6989586621679722888"><span class="annot"><span class="annottext">msgs :: [Doc]
</span><a href="#local-6989586621679722888"><span class="hs-identifier hs-var hs-var">msgs</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-special">[</span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;or&quot;</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleWithSource -&gt; Doc
forall {a}. Pretty a =&gt; WithSource a -&gt; Doc
</span><a href="#local-6989586621679722886"><span class="hs-identifier hs-var">displayModuleWithSource</span></a></span><span> </span><span class="annot"><span class="annottext">ModuleWithSource
</span><a href="#local-6989586621679722885"><span class="hs-identifier hs-var">y</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span id="local-6989586621679722885"><span class="annot"><span class="annottext">ModuleWithSource
</span><a href="#local-6989586621679722885"><span class="hs-identifier hs-var">y</span></a></span></span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">[ModuleWithSource]
</span><a href="#local-6989586621679722890"><span class="hs-identifier hs-var">ys</span></a></span><span class="hs-special">]</span><span>
</span><span id="line-381"></span><span>    </span><span id="local-6989586621679722887"><span class="annot"><span class="annottext">help_msg :: Maybe a -&gt; Doc
</span><a href="#local-6989586621679722887"><span class="hs-identifier hs-var hs-var">help_msg</span></a></span></span><span> </span><span class="annot"><span class="annottext">Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-382"></span><span>      </span><span class="hs-comment">-- TODO: This advice doesn't help if the ambiguous exports</span><span>
</span><span id="line-383"></span><span>      </span><span class="hs-comment">-- come from a package named the same thing</span><span>
</span><span id="line-384"></span><span>      </span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;The ambiguity can be resolved by qualifying the&quot;</span></span><span>
</span><span id="line-385"></span><span>           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;re-export with a package name.&quot;</span></span><span>
</span><span id="line-386"></span><span>           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;The syntax is 'packagename:ModuleName [as NewName]'.&quot;</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-387"></span><span>    </span><span class="hs-comment">-- Qualifying won't help that much.</span><span>
</span><span id="line-388"></span><span>    </span><span class="annot"><a href="#local-6989586621679722887"><span class="hs-identifier hs-var">help_msg</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><span class="hs-identifier">_</span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-389"></span><span>      </span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;The ambiguity can be resolved by using the&quot;</span></span><span>
</span><span id="line-390"></span><span>           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;mixins field to rename one of the module&quot;</span></span><span>
</span><span id="line-391"></span><span>           </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;names differently.&quot;</span></span><span> </span><span class="hs-special">]</span><span>
</span><span id="line-392"></span><span>    </span><span id="local-6989586621679722886"><span class="annot"><span class="annottext">displayModuleWithSource :: WithSource a -&gt; Doc
</span><a href="#local-6989586621679722886"><span class="hs-identifier hs-var hs-var">displayModuleWithSource</span></a></span></span><span> </span><span id="local-6989586621679722882"><span class="annot"><span class="annottext">WithSource a
</span><a href="#local-6989586621679722882"><span class="hs-identifier hs-var">y</span></a></span></span><span>
</span><span id="line-393"></span><span>      </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">[Doc] -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#vcat"><span class="hs-identifier hs-var">vcat</span></a></span><span> </span><span class="hs-special">[</span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#quotes"><span class="hs-identifier hs-var">quotes</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">a -&gt; Doc
forall a. Pretty a =&gt; a -&gt; Doc
</span><a href="Distribution.Pretty.html#pretty"><span class="hs-identifier hs-var">pretty</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WithSource a -&gt; a
forall a. WithSource a -&gt; a
</span><a href="Distribution.Backpack.ModuleScope.html#unWithSource"><span class="hs-identifier hs-var">unWithSource</span></a></span><span> </span><span class="annot"><span class="annottext">WithSource a
</span><a href="#local-6989586621679722882"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-394"></span><span>             </span><span class="hs-special">,</span><span> </span><span class="annot"><span class="annottext">String -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#text"><span class="hs-identifier hs-var">text</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;brought into scope by&quot;</span></span><span> </span><span class="annot"><span class="annottext">Doc -&gt; Doc -&gt; Doc
</span><a href="../../pretty/src/Text.PrettyPrint.HughesPJ.html#%3C%2B%3E"><span class="hs-operator hs-var">&lt;+&gt;</span></a></span><span>
</span><span id="line-395"></span><span>                </span><span class="annot"><span class="annottext">ModuleSource -&gt; Doc
</span><a href="Distribution.Backpack.ModuleScope.html#dispModuleSource"><span class="hs-identifier hs-var">dispModuleSource</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">WithSource a -&gt; ModuleSource
forall a. WithSource a -&gt; ModuleSource
</span><a href="Distribution.Backpack.ModuleScope.html#getSource"><span class="hs-identifier hs-var">getSource</span></a></span><span> </span><span class="annot"><span class="annottext">WithSource a
</span><a href="#local-6989586621679722882"><span class="hs-identifier hs-var">y</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-396"></span><span>             </span><span class="hs-special">]</span><span>
</span><span id="line-397"></span></pre></body></html>